I found a script that works pretty well. I was wondering though if you knew how to either redirect the user back to the home page from this form sent page that is generated. Either that or provide a link that the user could click on to return to the home page. This is the section of code where it would go:
echo "<HTML><HEAD><TITLE>Form Sent!
</TITLE></HEAD><BODY>";
echo "<H1 align=center>Thank You,
$sender_name</H1>";
echo "<P align=center>Your feedback has been
sent.</P>";
echo "</BODY></HTML>";
Also if you look at the code it is set up to require the sender_email and the message, how can I add to those requirements additional variables?
thanks for any help.
Here is the entire basic code, I still have to modify it some.
<?php
if ($sender_email and $message)
{
$msg = "Sender Name:\t$sender_name\n";
$msg .= "Sender E-Mail:\t$sender_email\n";
$msg .= "Message:\t$message\n\n";
$recipient = "
[email protected]";
$subject = "Web Site Feedback";
$mailheaders = "From: My Web Site <> \n";
$mailheaders .= "Reply-To: $sender_email\n\n";
mail($recipient, $subject, $msg, $mailheaders);
echo "<HTML><HEAD><TITLE>Form Sent!
</TITLE></HEAD><BODY>";
echo "<H1 align=center>Thank You,
$sender_name</H1>";
echo "<P align=center>Your feedback has been
sent.</P>";
echo "</BODY></HTML>";
} else {
echo "<HTML><HEAD><TITLE>Form empty!
</TITLE></HEAD><BODY>";
echo "<H1 align=center>There is no email address or
no message boby.</H1>";
echo "<P align=center>Please go back and make sure
you have entered an email address and a message
body</P>";
echo "</BODY></HTML>";
}
?>