This article shows you how to create a PHP based email form that supports file attachment. The article will also show you how to validate the type and size of the uploaded file. Note: It is easy to create complete file upload forms using Simfatic Forms. Visually design the form, get form submissions by email, save submissions to database and more. No coding required. Read more about Simfatic Forms here. The HTML form with file upload box The code for an HTML form with a file upload box is given below.