Mr.Techie456 Posted May 22, 2010 Share Posted May 22, 2010 I really need some help I have this emailing system for my website that is PHP based, and some of my e-mailers have been complaining that they can't put attachments in the email (such as images, video, etc.). Unfortunately I haven't added that as an option yet. so can somebody help me incorporate that feature into the script i already have. This the part of my script that send out the information <? /*Type anything but all spam and pornographic content will be blocked*/ $emailSubject = 'Stefanscorner.com (Email)'; $webMaster = 'email address here'; /*Gathering Data Variables*/ $nameField = $_POST ['name']; $emailField = $_POST ['email']; $commentsField = $_POST ['comments']; $body = <<< EOD Name: $nameField Email: $emailField Comments: $commentsField EOD; $headers = "From: $email\r\n"; $headers .= "Content-type: text/html\r\n"; $success = mail($webMaster, $emailSubject, $body, $headers); /* Results rendered as HTML */ $theResults = <<< EOD ?> Thanks in advance. Link to comment Share on other sites More sharing options...
Mr.Techie456 Posted June 11, 2010 Author Share Posted June 11, 2010 Come on anytime now. With an answer. Link to comment Share on other sites More sharing options...
el coniglio Posted August 7, 2010 Share Posted August 7, 2010 Well, you just have to handle the <input type="file"> in your php, as described in: http://php.net/manual/en/features.file-upl...post-method.php I suggest to you dinamically create fields using javascript, so you label them "uploadN", in the php you will handle these as in the link above. To the mail() call, take a look in this tutorial: http://www.webcheatsheet.com/PHP/send_emai....php#attachment Link to comment Share on other sites More sharing options...
Recommended Posts