Forum Moderators: coopster

Message Too Old, No Replies

php code to email attachments

         

kapow

4:20 pm on Feb 17, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I have a simple form I use to send emails when I am away from the office (copied below).

Can anyone tell me the php code to get the form to send attachments?

------------------
<? if if ($submit) {
mail($MYEMAIL,$SUBJECT,$MESSAGE,"From: $EMAIL");
} else {
echo "Send Email";
}?>

<FORM METHOD=POST>
To: <input type=TEXT name="MYEMAIL">
From: <input type=TEXT name="EMAIL">
Subject: <input type=TEXT name="SUBJECT">
Message: <textarea name="MESSAGE"></textarea>
<input type=SUBMIT name="submit">
</FORM>

Timotheos

5:30 pm on Feb 17, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



There's a lot of examples in the user comments of the manual [php.net] that should at least get you jumpstarted.