Hello gurus, need some help here please. I have mail php script with out attachment possibilities. How can I add attachment in to this one?
<? $MailToAddress = [EMAIL PROTECTED]; $MailSubject = "subject"; if (!$MailFromAddress) { $MailFromAddress = "[EMAIL PROTECTED]"; } $Header = "header"; $Footer = "Footer"; ?> <html> <body bgcolor="#FFFFFF"> <font face="Arial"><center> The following information has been delivered: </center> <? if (!is_array($HTTP_POST_VARS)) return; reset($HTTP_POST_VARS); while(list($key, $val) = each($HTTP_POST_VARS)) { $GLOBALS[$key] = $val; $val=stripslashes($val); echo "<b>$key</b> = $val<br>"; $Message .= "$key = $val\n"; } if ($Header) { $Message = $Header."\n\n".$Message; } if ($Footer) { $Message .= "\n\n".$Footer; } mail( "$MailToAddress", "$MailSubject", "$Message", "From: $MailFromAddress"); ?> ///////////////////////////////////////////////////////// last part I changed like this: mail( "$MailToAddress", "$MailSubject", "$Message", "From: $MailFromAddress", "$attachment"); and there are forms in my html: <FORM name="your_file" value="2000000"><input name="attachment" type="file"> <input type="text" name="MailFromAddress"> <input type="submit" value="Submit"> ///////////////////////////////////////////////////////// I recieve the mail with all the req. fields, but attachment is not picked up, instead it writes: Attacment=c:\picture.gif So what is wrong?