Okay, I am a PHP newbie. I have a basic PHP script that I use as a contact us form. I am currently developing a new site, and want to have an add file option.
Using HTML to add the "browse" form is a piece of cake, but how do I encorporate this into the PHP submission code so that it will attache the file as an email attachement when it sends the email? Here are some snippets of my code: (Hopefully this is enough to be able to help).
Code:
// How Do I put the File into a Variable?
$name = $_POST['name'] ;
$email = $_POST['email'] ;
$messageproper =
"Email: $email\n" .
"Name: $name\n" .
"\n\n\n" ;
// After the File is in the Variable, How do I add it as an Attachment in this code?
mail($mailtoweb, $subject, $messageproper, "From: \"$name\" <$email>\nReply-To: \"$name\" <$email>\nX-Mailer: chfeedback.php 2.02" );
header( "Location: $thankyouurl" );
exit ;