If geeks love it, we’re on it

Howdy, Stranger!

You found the friendliest gaming & tech geeks around. Say hello!

PHP Attachment through POST

I am currently using a main page that has a form declared as such...
[html]

action="mailSubmit.php" enctype="multipart/form-data">



[/html]The following is the contents of my mailSubmit.php file.



extract($_POST,EXTR_SKIP);

$to = \"email here@example.com\";
$subject = \"Online Credit Request\";


$body = $body . \"Course: \".$course.\"\nCollege/University: \".$college.\"\nProfessor: \".$professor.\"\nYear/Term: \".$year.\"\n\nCourse requestor information\nName: \".$name.\"\nEmail address: \". $email. \"\nAddress:\n\". $streetaddress.\"\n\".$city.\", \".$state.\" \".$zipcode.\"\nPhone Number: \". $number;
mail($to, $subject, $body)
?>
My question is how do I modify my mailSubmit.php file to accept and send the specified file in the email it is sending.

Thanks in advance for any help!

Comments

Sign In or Register to comment.