Programming > Web Languages

how can I send images to an email address with php?


hey everybody,

I have a simple form that looks like this:

<form action="mailForm.php" method="post" name="myform" enctype="multipart/form-data">
<input type="hidden" value="" name="recipient" />

Image 1:<br />
<input name="userfile" type="file" name="image1" />

Image 2:<br />
<input name="userfile" type="file" name="image2" />

Image 3:<br />
<input name="userfile" type="file" name="image3" />


what kind of function do I have to write in "mailForm.php" file to make the images send to "" ? PLEASE HELP

The problem you are having is that you have to change the headers in order to prepare to send the image along with the rest of the message. Take a look at this (and 10K other results from google) for example code (no reason recreating the wheel):



[0] Message Index

Go to full version