|
Posted by Geoff Berrow on 07/24/05 04:12
I noticed that Message-ID: <O-mdnQMZoZHreX_fRVn-2Q@rogers.com> from
Trypt contained the following:
>B. A redirection to a html page. For example, when the user completes
>the form, I'd like them to be taken to a success.html page if
>successful, or error.html if not.
Make sure that this is the only thing on this page. Then do:
<?
$Name=$_POST['Name'];
$Email=$_POST['Email'];
$Comments=$_POST['Message'];
$to="contact@webhost.com";
$message="$Name just filled in your contact form. Message
was:\n$Message\n\nTheir E-Mail address was: $Email";
if(mail($to,"Comments From Your Site",$message,"From: $Email\n")) {
header("Location: success.html");
} else {
header("Location: error.html");
}
?>
(assuming these pages are in the same directory. To be safe, use the
full URL)
--
Geoff Berrow 0110001001101100010000000110
001101101011011001000110111101100111001011
100110001101101111001011100111010101101011
Navigation:
[Reply to this message]
|