attachment problem

From: Date: Fri, 08 Feb 2002 20:27:36 +0000
Subject: attachment problem
Groups: php.general 
Request: Send a blank email to php-general+get-84045@lists.php.net to get a copy of this message
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 = me@myweb.com; $MailSubject = "subject"; if (!$MailFromAddress) { $MailFromAddress = "SENDERS@ADDRESS.GOES.HERE"; } $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?

« previous php.general (#84045) next »