Hi again!
Ok I have a thanks page, and I saved your php code into a file and saved it in the same folder. Still not working though:
The form code on my main page is:
HTML Code:
<form name="form1" action="formSender1.php" method="post">
<label for="firstname">First Name :</label>
<input name="firstname" type="text" />
<br />
<label for="lastname">Last Name :</label>
<input name="lastname" type="text" />
<br />
<label for="address">Address :</label>
<input name="address" type="text" />
<br />
<label for="phonehome">Phone (home) :</label>
<input name="phonehome" type="text" />
<br />
<label for="phonecell">Phone (cell) :</label>
<input name=phonecell" type="text" />
<br />
<label for="emailaddress">Email Address :</label>
<input name="emailaddress" type="text" />
<br />
<input type="reset" />
<input type="submit" />
</form>
Then I created a php page called formsender1.php and I used your code:
PHP Code:
<?
$firstname = $_POST['firstname'];
$lastname = $_POST['lastname'];
$address = $_POST['address'];
$phonehome = $_POST['phonehome'];
$phonecell = $_POST['phonecell'];
$emailaddress = $_POST['emailaddress'];
$to = "whatever@yahoo.com";
$subject = "Grill Form";
$body = "First name: ".$firstname."\r\n\r\n";
$body = "Last name: ".$lastname."\r\n\r\n";
$body = "Address: ".$address."\r\n\r\n";
$body = "Home Phone: ".$phonehome."\r\n\r\n";
$body = "Home (cell): ".$phonecell."\r\n\r\n";
$body = "Email Address: ".$emailaddress."\r\n\r\n";
$from = ".$emailaddress.";
mail($to, $subject, $body, $from);
header("Location: http://www.mypage.ca/thankyou.htm");
exit;
?>
I believe my server supports php stuff as well, did I do anything wrong above?
Bookmarks