Send info to next page..
Posted: Wed Sep 06, 2006 11:19 pm
feyd | Please use
This code currently emails me the form information. I plan on making the form more in depth allowing the user to select different options and I want them to be able to view what they selected once they submit the form. I know that this can be accomplished by using my varaibles on the next page but all I get are the following: '$name' instead of 'John Doe.' So the question is: am I not able to send an email as well as send their information to the next page? Does the Request have to be Post in order to make this possible. Remember, I still want to get the email.
Greg
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Ok here is my code:Code: Select all
<?
$email = $_REQUEST['email'];
$name = $_REQUEST['name'];
$phone = $_REQUEST['phone'];
$contact = $_REQUEST['contact'];
$comments = $_REQUEST['comments'];
ini_set("SMTP","127.0.0.1");
if (empty($name) || empty($email)) {
?>
<html>
<head><title>Error</title></head>
<body>
<h1>Error</h1>
<p>
Oops, it appears you forgot to enter either your
email address or your message. Please press the BACK
button in your browser and try again.
</p>
</body>
</html>
<?
}
else {
mail("contact@gkwinspired.com", "Feedback Form Results" , "name: $name\nPhone: $phone\nContacting Who: $contact\nComments:\n$comments",
"From: $name <$email>");
header ("Location: http://www.gkwinspired.com/feedback.htm");
}
?>Greg
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]