HI,
I use e-mail forms on my site frequently for user feedback, and it works great. However; now I for one of the forms I want users to upload a picture (which will send to my email ) as well. I'm still pretty new to this so I'm not quite sure how to go about it. This is what I have now:
<?
$email = $_POST['email'];
$image = $_FILES['fupload']['tmp'];
$to = "myemail@gmaildotcom";
if($_FILES['fupload']['type'] == "image/jpg" ) {
mail($to,
"Email: $email" ,
"
Picture: $image" );
}
?>
<form enctype="multi-part/form-data"
action="<? print $_SERVER['PHP_SELF'] ?>" method="post">
<p>
Email:<input type="text" value="<? echo $email ?>" />
<input type="hidden" name="MAX_FILE_SIZE" value="102400" />
<input type="file" name="fupload" /><br />
<input type="submit" value="Send" />
</form>
I'm pretty sure what I have to do is save the images temporarily in a folder somewhere on my server, and then send the image from there, or maybe not? Any help would be greatly appreciated! looking forward to feedback,
thanks.
(If you have a link to an application that I could buy that does this, that would work too... would prefer to not have to pay for it though)