Allright, I've followed the help in there.. and I've come this far;
-----------------------------------------------------------------------------------
<form action="sendmail.php" method="post" enctype="multipart/form-data">
<p>Email:
<input name="email" type="text" />
</p>
<p>
<input type="file" name="file">
<br />
Message:<br />
<textarea name="message" rows="15" cols="40">
</textarea>
<br />
<input type="submit" />
</p>
</form>
-----------------------------------------------------------------------------------
sendmail.php looks like this:
-----------------------------------------------------------------------------------
<?
$email = $_REQUEST['email'] ;
$message = $_REQUEST['message'] ;
$file =$_REQUEST['file'] ;
if (!isset($_REQUEST['email'])) {
header( "Location: http://www.mail.com/submit.htm" );
}
elseif (empty($email) || empty($message)) {
header( "Location: http://www.mail.com/submit.htm" );
}
else {
mail( "myname@mail.com", "Feedback Form Results",
$message, $file, "From: $email" );
header( "Location: http://www.mail.com/submit.htm" );
}
?>
-----------------------------------------------------------------------------------
Allright, I'm almost done. The only thing that's left is to get the file sending working. What's wrong with my code? Why won't the files get sent in the email to me? Don't bother the locations, just changed those now because of some privacy. I just wish I could get the file uploading to work
