I am receiving this error message when I try to process a form on a customer website:
Parse error: syntax error, unexpected '=' in /home1/goldsilv/public_html/taurusprotection/application_process.php on line 24
Here is the PHP script, I'm new to PHP, so go ahead and eat me up like a newb, but I do need some help.
<?php
/* Subject and email variables */
$emailSubject = 'Job Application';
$webMaster = 'example@example.com';
/* gathering data variables */
$FirstnameField = $_POST['Firstname'];
$lastnameField = $_POST['lastname'];
$EmailField = $_POST['Email'];
$AddressField = $_POST['Address'];
$cityField = $_POST['city'];
$stateField = $_POST['state'];
$zipcodeField= $_POST['zipcode'];
$phone1Field = $_POST['phone1'];
$phone2Field = $_POST['phone2'];
$felonyField = $_POST['felony?'];
Line 21----->$felony-explanationField = $_POST['felony-explanation']; <---------Line 21
$amountField = $_POST['amount'];
$hr-or-yearField = $_POST['hr-or-year'];
$Project-development-mgrsField = $_POST['Project-development-mgrs'];
$armed-officerField = $_POST['armed-officer'];
$unarmed-officerField = $_POST['unarmed-officer'];
$event-securityField = $_POST['event-security'];
$resumeField = $_POST['resume'];
$body = <<<EOD
<br><hr><br>
First Name: $FirstnameField <br>
Last Name: $lastnameField <br>
Email: $EmailField <br>
Address: $AddressField <br>
City: $cityField <br>
State: $stateField <br>
Zip: $zipcodeField <br>
Primary phone: $phone1Field <br>
secondary phone: $phone2Field <br>
Been convicted of a felony: $felony?Field <br>
Explanation: $felony-explanationField <br>
Required salary: $amount / $hr-or-yearField <br>
Positions interested in: $Project-development-mgrsField
$armed-officerField
$event-securityField
$resumeField <br>
EOD;
$headers = "From: $email\r\n";
$headers .= "Content-type: text/html\r\n";
$success = mail($webMaster, $emailSubject, $body, $headers);
/*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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<META HTTP-EQUIV="refresh" CONTENT="3;URL=http://www.taurusprotection.com/security_resources.html">
<title>Thanks for your contact!</title>
</head>
<body>
<align="center">
<br>
<p><h3>Your application has been successfully sent!</h3></p>
<br>
<p>Thank you for your interest in joining Taurus Protection Agency!</p>
<br>
<p>You are about to be redirected to our <b>Security Resources</b> page.</p>
</align>
</body>
</html>
EOD;
echo "$theResults";
?>
I seem to get more errors when I remove that line completely. So I'm assuming I have other mistakes. Can someone please help me out?
-Zack