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.

[php]

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)
?>[/php]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

  • edited August 2011
    I've found one that would would but would require me to install PEAR onto the server and I am not quite sure if I have the permissions to install stuff onto the server!
Sign In or Register to comment.