<body>
<H1>Prayer Requests</h1>
<HR>
<h3>Please enter your prayer request below.</h3>
<BR>
<Form method="post" action="mailto:support@crosspoint.org" enctype="text/plain">
Type your prayer here:<br>
<Textarea name="Pray for this:" Rows=20 cols=40></textarea>
<BR>
<FIELDSET>
<LEGEND><b>~Remember~</b></LEGEND>
Your prayer needs are confidential, so you don’t need to give an e-mail address.<BR>
<BR>
But if you would like one of the pastors or other leaders to contact you, then please enter you e-mail below.<BR>
<input type="text" name="E-mail:" Size="30">
<BR>
</fieldset>
<BR>
<P>
<input type="submit" value="SEND YOUR PRAYER"><input type="reset" value="RESET INFORMATION">
</form>
<BR>
<BR>
</body>
</html>
So how come when you click submit it just goes to a regular mailto: command?... the website is here: www.crosspoint.org/Prayer.html
“The power of the Web is in its universality. Access by everyone regardless of disability is an essential aspect.”
—Tim Berners-Lee, W3C Director and inventor of the World Wide Web
It's going to the mailto: command becasue that's what you are telling it to do in your code. <Form method="post" action="mailto:support@crosspoint.org" enctype="text/plain">
What server side code are you allowed to use? Here's what I have for my site, but it uses PHP. If you can't use PHP then ignore this part.
<!-- Begin edit here -->
<?php
header("Refresh: 3; URL=/index.html");
echo " "; // NN4 requires that we output something...
exit();
$msg = "Email from your website.\n";
$msg .= "From: $Name \n";
$msg .= "E-Mail: $EMail \n";
$msg .= "$Comments";
$email_to = "me@matts-website.net";
$frome = "From: $EMail";
$subject_line = "Matt's Website e-mail.";
$Name = trim($Name);
mail($email_to,$subject_line,$msg,$frome);
echo "Your email has been sent to me and I will read it as soon as possible.";
?>
<!-- End edit here -->
I also added this <meta> tag in my confirm.php page to refresh the page to my home page.
If I may make a suggestion about your PHP code, I would say that you should program assuming global variables are off, as they now are as a default since PHP 4.2.0 (though many hosts manually turn them on). So, this line:
$msg .= "From: $Name \n";
should be:
$msg .= "From: $_POST["Name"]\n";
While you are switching, you may just want to use a loop to loop through all the $_POST vars. That way, if you ever use a form with more than message files, it won't be a problem. Something like this one here: http://forums.webdeveloper.com/showt...9543#post48748
Bookmarks