How would I add a restriction to only allow, word, pdf and notepad document to be sent with this form script.
<?php if(isset($_POST['submit'])) { //Deal with the email $to = '[email protected]'; $message = strip_tags($_POST['CV Submitted']); $attachment = chunk_split(base64_encode(file_get_contents($_FILES['file']['tmp_name']))); $filename = $_FILES['file']['name']; $boundary =md5(date('r', time())); $subject = "CV Upload Form"; $message = "Someone submitted the following information from our cv upload form. Name: ".$_POST["name"]." Email: ".$_POST["email"]." Telephone: ".$_POST["number"]." Sector: ".$_POST["sector"]." Comments: ".$_POST["Comment"]." "; $message_html = "Someone submitted the following information from our cv upload form.
Name: ".$_POST["name"]."
Email: ".$_POST["email"]."
Telephone: ".$_POST["number"]."
Sector: ".$_POST["sector"]."
Comments: ".$_POST["comment"]."