Hi
Can some one please help me. I have created a form called UploadDoc. In this form I have a browse button to allow user to select the file to upload. I then use a php form called ThankYouDoc.php to send the form to my e-mail. This form and php code works when the user clicks on the sumbit button on the form. I would like to know how can I send the browsed file as an attachemt to my e-mail address. As at the moment only other fileds on the form are submitted to my e-mail address.
PHP Code for ThankYouDoc
CODE
<?PHP
$mailto = "consultant@i-angel.co.uk";
$email = $HTTP_POST_VARS['email'];
if ($email == "") {
$email = $mailto;
}
$mailsubj = "Upload Doc";
$mailhead = "From: $email\n";
reset ($HTTP_POST_VARS);
$mailbody = "Values submitted from web site form :\n";
while (list ($key, $val) = each ($HTTP_POST_VARS))
{
if ($key!="submit")
{
$mailbody .= "$key : $val\n";
}
}
mail($mailto, $mailsubj, $mailbody, $mailhead);