Honey Pot results not working. I need a PHP nudge in the right direction

Hi Everyone

I am trying to cobble together a contact form with a Honey Pot Spam protector. Newby here. I’m basing it off of the following link but I am trying to tweak it so that it will do what I want it to do.

http://devgrow.com/simple-php-honey-pot/

You can see the contact form here http://www.discovermassagespa.com/contact.html.

Please do not look at the php code for http://www.discovermassagespa.com/contactus.php as I am changing that. Please refer to the following code.

<?php








/* Email Variables */



$emailSubject = 'The Massage Spa';



$webMaster = 'matt@webskillsplus.com';

//$webMaster = 'info@discovermassagespa.com';

//$webMaster = 'murrterr@rcn.com';



/* Data Variables */


$Name = $_POST['Name'];

$LastName = $_POST['LastName'];

$Email = $_POST['Email'];

$Area_Code = $_POST['Area_Code'];

$Phone_Prefix = $_POST['Phone_Prefix'];

$Line_Number = $_POST['Line_Number'];

$help = $_POST['help'];

if (isset($_POST["submit"])) {
echo $_POST["when"];

$robotest = <<<EOD


<!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" xml:lang="en" lang="en">
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>

 <p>This site is spam protected. If you are human please go back and try again.</p>
<p>The Massage Spa Team.</p>

</body>
</html>


		
		   EOD;
		   echo "$robotest";
			

  } else {









$body = <<<EOD

\\r\
 \\r\
 <br>

First Name: $Name \\r\
 <br>

Last Name: $LastName \\r\
 <br>

Email: $Email \\r\
 <br>

Phone: $Area_Code $Phone_Prefix $Line_Number \\r\
 <br>

How can we help you?: $help \\r\
 <br>

When: $when \\r\
 <br>

EOD;





$from = "From: info@discovermassagespa.com\\r\
";

$from .= "Reply-To: ".$Email."\\r\
";

$from .= "Content-type: text/html\\r\
";



mail($webMaster, $emailSubject, $body, $from);

/* Prepare autoresponder subject */
$respond_subject = "Thank you for contacting Massage Spa";

/* Prepare autoresponder message */
$respond_message = "Thank you for contacting Massage Spa

Someone will contact you soon.

15966 Hickman Road, Clive Iowa 50325
515.987.4593
info@discovermassagespa.com

Shop Hours: Mon-Fri 10am-9pm, Sa 9am-7pm, Su 11am-4pm
";

$from = "From: info@discovermassagespa.com\\r\
";

/* Send the message using mail() function */
mail($Email, $respond_subject, $respond_message, $from);





/* Results rendered as HTML */




$theResults = <<<EOD

<!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" xml:lang="en" lang="en">
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>

 <p>Thanks for contacting us.</p>
<p>The Massage Spa Team.</p>

</body>
</html>

EOD;

echo "$theResults";

}

?>

The following is the HTML and the CSS that is relevant to the Honey Pot.

<p class="robotic" id="pot">
            <label>If you're human leave this blank:</label>
            <input name="robotest" type="text" id="robotest" class="robotest" /></p>
.robotic {
  display: none;
}

I’m not sure what I am doing wrong. Thanks in advance for your help.

if (isset($_POST[“submit”])) {

        &lt;input name="[COLOR="#FF0000"]robotest[/COLOR]" type="text" id="robotest" class="robotest" /&gt;&lt;/p&gt;

PS: You cannot have indentations in HEREDOC string closures. The first character on the line must be the “E” in “EOD;” (tabs count as characters).

Thanks for your help. I am so green at this stuff. But I am learning quickly.

I made some changes but I am still having some issues.

<?php








/* Email Variables */



$emailSubject = 'The Massage Spa';



$webMaster = 'matt@webskillsplus.com';

//$webMaster = 'info@discovermassagespa.com';

//$webMaster = 'murrterr@rcn.com';



/* Data Variables */


$Name = $_POST['Name'];

$LastName = $_POST['LastName'];

$Email = $_POST['Email'];

$Area_Code = $_POST['Area_Code'];

$Phone_Prefix = $_POST['Phone_Prefix'];

$Line_Number = $_POST['Line_Number'];

$help = $_POST['help'];

if (isset($_POST["submit"])) {
echo htmlentities($_POST['when']);

$robotest = <<<EOD


<!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" xml:lang="en" lang="en">
<head>
<title>Massage Spa was created with whole body health and wellness in mind. </title>

</head>
<body>

   <h1 class="homeheader">If you are a spam robot please go away.</h1>

</body>
</html>

EOD;echo "$robotest";


  } else {









$body = <<<EOD

\\r\
 \\r\
 <br>

First Name: $Name \\r\
 <br>

Last Name: $LastName \\r\
 <br>

Email: $Email \\r\
 <br>

Phone: $Area_Code $Phone_Prefix $Line_Number \\r\
 <br>

How can we help you?: $help \\r\
 <br>

When: $when \\r\
 <br>

EOD;




$from = "From: info@discovermassagespa.com\\r\
";

$from .= "Reply-To: ".$Email."\\r\
";

$from .= "Content-type: text/html\\r\
";



mail($webMaster, $emailSubject, $body, $from);

/* Prepare autoresponder subject */
$respond_subject = "Thank you for contacting Massage Spa";

/* Prepare autoresponder message */
$respond_message = "Thank you for contacting Massage Spa

Someone will contact you soon.

15966 Hickman Road, Clive Iowa 50325
515.987.4593
info@discovermassagespa.com

Shop Hours: Mon-Fri 10am-9pm, Sa 9am-7pm, Su 11am-4pm
";

$from = "From: info@discovermassagespa.com\\r\
";

/* Send the message using mail() function */
mail($Email, $respond_subject, $respond_message, $from);





/* Results rendered as HTML */




$theResults = <<<EOD

<!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" xml:lang="en" lang="en">
<head>
<title>Massage Spa was created with whole body health and wellness in mind. </title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

</head>
<body>

   <h1 class="homeheader">Thank you for contacting Massage Spa</h1>

      <p>Someone will be in touch with you soon.</p>
      <p>The Massage Spa Team.</p>

</body>
</html>

EOD;
echo "$theResults";

}

?>

A couple of things are happening.

It appears


$robotest = <<<EOD 

is failing. I tested the honey pot and filled it out like a robot. it completely ignores it and renders (if that is the right word) the html page that says “Someone will be in touch with you soon”. It will send the results of the field to the right email (success) however the auto responder is not working as well.

Any ideas?