I’ve got this code
[code=php]<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN” “http://www.w3.org/TR/html4/loose.dtd”>
<html>
<head>
<meta http-equiv=”Content-Type” content=”text/html; charset=iso-8859-1″>
<title>Untitled Document</title>
</head>
<body>
<?
print_r($_POST);
//make sure there is data in the name and email fields
if( empty($_POST[“Name”]) )
{
$error[“name”] = “Name is required.”;
$Name = “”;
}
else
$Name = $_POST[“Name”];
if( empty($_POST[“Email”]) )
{
$error[“email”] = “Email is required.”;
$Email = “”;
}
else
$Email = $_POST[“Email”];
if( empty($_POST[“Company”]) )
{
$Company = “”;
}
else
$OtherInfo = $_POST[“Company”];
if( empty($_POST[“PhoneNo”]) )
{
$OtherInfo = “”;
}
else
$OtherInfo = $_POST[“PhoneNo”];
//check to make sure the qty fields are whole numbers
//but only check if there was data entered
if( !empty($_POST[“qtyA”]) )
{
if( is_numeric($_POST[“qtyA”]) && ( intval($_POST[“qtyA”]) == floatval($_POST[“qtyA”]) ) )
{
//we have a whole number
}
else
$error[“qtyA”] = “Please enter a whole number for Quantity 1001.”;
}
if( !empty($_POST[“qtyB”]) )
{
if( is_numeric($_POST[“qtyB”]) && ( intval($_POST[“qtyB”]) == floatval($_POST[“qtyB”]) ) )
{
//we have a whole number
}
else
$error[“qtyB”] = “Please enter a whole number for Quantity 1002.”;
}
if( !empty($_POST[“qtyC”]) )
{
if( is_numeric($_POST[“qtyC”]) && ( intval($_POST[“qtyC”]) == floatval($_POST[“qtyC”]) ) )
{
//we have a whole number
}
else
$error[“qtyC”] = “Please enter a whole number for Quantity 1003.”;
}
//we should have at least 1 item ordered in the form
if( empty($_POST[“qtyA”]) && empty($_POST[“qtyB”]) && empty($_POST[“qtyC”]) )
$error[“no_qty”] = “Please enter at least 1 item to order.”;
if( is_array($error) )
{
echo “An error occurred while processing your order.”;
echo “<br>n”;
echo “Please check the following error messages carefully, then click back in your browser.”;
echo “<br>n”;
while(list($key, $val) = each($error))
{
echo $val;
echo “<br>n”;
}
//stop everything as we have errors and should not continue
exit();
}
$mailto = “[email protected]”;
$subject = “Web Order”;
$body = “The following confirms the details of your order:n”;
$body .= “nn”;
$body .= “Name: ” . $Name . “n”;
$body .= “Email: ” . $Email . “n”;
$body .= “Company: ” . $Company . “n”;
$body .= “nn”;
$body .= “HR 1001 Widgets: (” . $qtyA . ” * ) “n”;
$body .= “HR 1002 Widgets: (” . $qtyB . ” * ) “n”;
$body .= “HR 1003 Widgets: (” . $qtyC . ” * ) “n”;
$body .= “n”;
mail($mailto, $subject, $body);
mail($Email, $subject, $body);
echo “The following information was sent.”;
echo “<br>n”;
echo “<pre>n”;
echo $body;
echo “</pre>n”;*/
?>
</body>
</html>
It gives out this error
[url]http://img.photobucket.com/albums/v326/Cloudsky/Error.jpg
Even after commenting out the affected areas and saving my work. I still recieve these errors. Can anyone help me out here?
Thanks! ?