Posted by Big Moxy on 10/04/07 00:34
I'm sorry if this turns out to be a double post but I got an error
during the first attempt.
I'm perplexed at the error in the header = ('location: index.php'); I
have used this before successfully but this time the syntax checker at
http://www.meandeviation.com/tutorials/learnphp/php-syntax-check/
issues this message: Parse error: parse error, unexpected '=' in
quickform.php on line 48.
48: header = ('location: index.php');
Could someone please point me in the right direction?
Thank you!
- tim
<?php
session_start();
error_reporting(E_ALL);
$to = "tim@website.com";
$subject = "Quick Form";
$headers = "MIME-Version: 1.0\r\n";
$headers.= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers.= "From: $emailaddress\r\n";
$today_mm = date("M");
$today_dd = date("j");
$today_yyyy = date("Y");
$today = $today_mm." ".$today_dd.", ".$today_yyyy;
$ip = $_POST['ip'];
$httpref = $_POST['httpref'];
$httpagent = $_POST['httpagent'];
$name = $_POST['firstname']." ".$_POST['lastname'];
$homephone = $_POST['homephone'];
$workphone = $_POST['workphone'];
$time2contact = $_POST['time2contact'];
$emailaddress = $_POST['emailaddress'];
$propertyaddress = $_POST['propertyaddress'];
$city = $_POST['city'];
$state = $_POST['state'];
$zipcode = $_POST['zipcode'];
$reason = $_POST['reason'];
$amountowed = $_POST['amountowed'];
$leastamount = $_POST['leastamount'];
$propertylocation = $city." ".$state." ".$zipcode;
$message = "<b>Date: </b>" . $today . "<br />";
$message.= "<b>Name: </b>" . $name . "<br />";
$message.= "<b>Home Phone: </b>" . $homephone . "<br />";
$message.= "<b>Work Phone: </b>" . $workphone . "<br />";
$message.= "<b>Email Address: </b>" . $emailaddress . "<br /
>";
$message.= "<b>Property Address: </b>" . $propertyaddress .
"<br />";
$message.= "<b>Property Location: </b>" . $propertylocation .
"<br />";
$message.= "<b>Amount Owed: </b>" . $amountowed . "<br />";
$message.= "<b>Lowest Offer Accepted: </b>" . $leastamount . "<br /
>";
$message.= "<b>Reason for Selling: </b>" . $reason . "<br />";
$message.= "<b>Additional Information</b><br />";
$message.= "<b>Requestor IP Address: </b>" . $ip . "<br />";
$message.= "<b>Requestor IP Address: </b>" . $ip . "<br />";
$message.= "<b>Requestor Browser Type: </b>" . $httpagent . "<br />";
$message.= "<b>Referring URL: </b>" . $httpref . "<br />";
$_SESSION['sent_message'] = "Thank you for your request! Someone will
be contacting you soon.";
mail($to_address, $subject, $message, $headers);
header = ('location: index.php');
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://
www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Thank You!</title>
</head>
<body>
</body>
</html>
[Back to original message]
|