Jump to content

php mail form help


cuekillar

Recommended Posts

mail.html------

<form action="send_email.php3" method="POST">
From:<input type="text" size="22" name="from" value="urisp@urisp.com"><br>
subject:<input type="text" size="22" name="subject" value="diary entry suggestion"><br>
Let me recieve newsletters!<input type="checkbox" name="php_script_list" value="yes"><br>
<textarea name="contents" rows="5" cols="40"></textarea><br>
Enter your message and click submit!<input type="submit" name="B1" value="Submit"><input type="reset" name="B2" value="Reset">

-------------------


send_email.php3 -----


<?
$to = "cue_killar@yahoo.co.uk";
$from_header = "From: $from";
if($contents != "")
{
//send mail - $subject & $contents come from surfer input
mail($to, $subject, $contents, $from_header);
// redirect back to url visitor came from
header("Location: $HTTP_REFERER");
}
else
{
print("<HTML><BODY>Error, no comments were submitted!");
print("</BODY></HTML>");
}
?>



------------------

The problem is that I'm trying to get this script to work and although it looks fine to me, when I go to the mail.html , fill out the form and submit all i get is this....


Error, no comments were submitted!");
print("</BODY></HTML>");
}
?>

and I dont get the email
ignore the mailing list, i no its not working or anything.


http://www.nintendo.online-cue.com/mail.html try it and see if it works for you 
hope you can help
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.