I have just finshed my first php code and posted it online and I am getting a Parse error: syntax error, unexpected T_VARIABLE in /home/hydeands/public_html/phpmail.php on line 45
But when I look at it it looks ok.
. I am just creating a php for a online form to direct the email.
Here is the code.
[code=php] <?php
$emailsubject = 'Judgement Recovery Application' ;
$web = 'mwcinvestigati on@example.net' ;
$casenumberFiel d = $_POST{'Case number'};
$amountField = $_POST{'Amount of judgment:'};
$collectedField = $_POST{'Amount collected to date:'};
$stateField = $_POST{'State judgment issued:'};
$attnField = $_POST{'Represe nted by attorney:'};
$defaultField = $_POST{'Awarded by default:'};
$dstateField = $_POST{'JD reside in different state:'};
$namejdField = $_POST{'Name of JD:'};
$addjdField = $_POST{'JD street address:'};
$cityjdField = $_POST{'JD city, state, zip:'};
$namejcField = $_POST{'JCsName '};
$addjcField = $_POST{'JCsAddr ess'};
$cityjcField = $_POST{'JCsCity '};
$phoneField = $_POST{'JCsPhon e'};
$emailjcField = $_POST{'JCsEmai l'};
$descrpField = $_POST{'Descrip tion'};
$judgeField = $_POST{'Judgmen t'};
$body = <<<EOD
<br><hr><br>
Email: $casenumber <br>
Amount: $amount <br>
Collected: $collected <br>
State of Judgement: $state <br>
Attorney: $attn <br>
Award by Default: $default <br>
JD Reside Diffent State: $dstate <br>
Name: $namejd <br>
Address: $addjd <br>
City: $cityjd <br>
Phone: $phone <br>
Email: $emailjc <br>
Description: $descrp <br>
Judgement: $judge <br>
EOD
$headers = "From:emailjcFi eld\r\n";
$headers .= "Content-type: text/html\r\n";
$success = mail($web, $emailsubject, $body, $headers);
$theResults = <<<EOD
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Refresh" content="5; url=http://www.example.com/home.html">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Thank you From Hyde & Seik Investigations</title>
<script src="Scripts/AC_RunActiveCon tent.js" type="text/javascript">
<style type="text/css">
<!--
body {
background-image: url(images/bg.jpg);
}
.style7 {
color: #FFFFFF;
font-weight: bold;
font-size: 18px;
}
.style13 {font-family: Broadway}
.style15 {font-size: xx-large}
-->
</style></head>
<body>
<div align="center"> </div>
<h1 align="center" class="style7"> <span class="style15" ><span class="style13" >Hyde & Seik</span>®</span><span class="style15" > Thanks you for your application and we will be in contact with you soon.</span></h1>
<p align="center"> </p>
<p align="center"> </p>
</body>
</html>
EOD;
echo "$theResult s";
?>
[/code]
Thank you for your help
But when I look at it it looks ok.
. I am just creating a php for a online form to direct the email.
Here is the code.
[code=php] <?php
$emailsubject = 'Judgement Recovery Application' ;
$web = 'mwcinvestigati on@example.net' ;
$casenumberFiel d = $_POST{'Case number'};
$amountField = $_POST{'Amount of judgment:'};
$collectedField = $_POST{'Amount collected to date:'};
$stateField = $_POST{'State judgment issued:'};
$attnField = $_POST{'Represe nted by attorney:'};
$defaultField = $_POST{'Awarded by default:'};
$dstateField = $_POST{'JD reside in different state:'};
$namejdField = $_POST{'Name of JD:'};
$addjdField = $_POST{'JD street address:'};
$cityjdField = $_POST{'JD city, state, zip:'};
$namejcField = $_POST{'JCsName '};
$addjcField = $_POST{'JCsAddr ess'};
$cityjcField = $_POST{'JCsCity '};
$phoneField = $_POST{'JCsPhon e'};
$emailjcField = $_POST{'JCsEmai l'};
$descrpField = $_POST{'Descrip tion'};
$judgeField = $_POST{'Judgmen t'};
$body = <<<EOD
<br><hr><br>
Email: $casenumber <br>
Amount: $amount <br>
Collected: $collected <br>
State of Judgement: $state <br>
Attorney: $attn <br>
Award by Default: $default <br>
JD Reside Diffent State: $dstate <br>
Name: $namejd <br>
Address: $addjd <br>
City: $cityjd <br>
Phone: $phone <br>
Email: $emailjc <br>
Description: $descrp <br>
Judgement: $judge <br>
EOD
$headers = "From:emailjcFi eld\r\n";
$headers .= "Content-type: text/html\r\n";
$success = mail($web, $emailsubject, $body, $headers);
$theResults = <<<EOD
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Refresh" content="5; url=http://www.example.com/home.html">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Thank you From Hyde & Seik Investigations</title>
<script src="Scripts/AC_RunActiveCon tent.js" type="text/javascript">
<style type="text/css">
<!--
body {
background-image: url(images/bg.jpg);
}
.style7 {
color: #FFFFFF;
font-weight: bold;
font-size: 18px;
}
.style13 {font-family: Broadway}
.style15 {font-size: xx-large}
-->
</style></head>
<body>
<div align="center"> </div>
<h1 align="center" class="style7"> <span class="style15" ><span class="style13" >Hyde & Seik</span>®</span><span class="style15" > Thanks you for your application and we will be in contact with you soon.</span></h1>
<p align="center"> </p>
<p align="center"> </p>
</body>
</html>
EOD;
echo "$theResult s";
?>
[/code]
Thank you for your help
Comment