title: Security of an online form
body: <p>I have been tasked with creating an online form that sends an email through Swiftmailer. Users can enter their data and attach pdf, doc, jpgs etc. I just want to get confirmation that what i am doing is a good idea :-)</p>
  
  <p>Our server has got SSL and the host handels all that :-)</p>
  
  <ol>
  <li><p>I validate peoples information while they enter it with jq</p></li>
  <li><p>I sanitize the form data with php</p></li>
  <li><p>i validate that the files they have uploadet are actually the files i want, by checking their filename, and looking into their mime type and checking their size (?) i also use the PHP temp function, so the user is not uploading a file they can access later and execute (?)</p></li>
  <li><p>And i send it, either through Gmail with their SSL or something else.</p></li>
  </ol>
  
  <p>Would this be an alright way to do it?</p>
  
  <p>Thank you</p>