I am building a simple contact form. I have done several of these in the past, but for some reason I cannot get this form to work. When submitted, the user gets the following response:
Parse error: parse error, unexpected T_STRING in /hsphere/local/home/eagleriv/eagleriverrentals.com/sendmail.php on line 57
What am I doing wrong? Can someone help? Thank you.
Here's the site:
http://www.eagleriverrentals.com/contact.html
Here's my code:
contact.html
<form action="sendmail.php" method="post">
<B>How would you like us to reply?</B><br>
<span class="MediumText">
<input type="radio" name="phone" value="radiobutton">
</span> Phone <span class="MediumText">
<input type="radio" name="Fax" value="radiobutton">
</span>Fax <span class="MediumText">
<input type="radio" name="Email2" value="radiobutton">
</span>Email <br>
<br>
<TABLE WIDTH="350" BORDER=0>
<TR><TD><B><FONT FACE="Courier New" COLOR="#000000">Name: </FONT></B>
</TD><TD> <input name="name" type="text" id="name3" size="25" />
</TD></TR><TR><TD><B><FONT FACE="Courier New" COLOR="#000000"> E-mail: </FONT></B>
</TD><TD> <input name="email" type="text" id="email3" size="25" />
</TD></TR><TR><TD><B><FONT FACE="Courier New" COLOR="#000000"> Phone: </FONT></B>
</TD><TD> <input name="phone" type="text" id="phone3" size="25" />
</TD></TR><TR><TD><B><FONT FACE="Courier New" COLOR="#000000"> Address: </FONT></B>
</TD><TD> <input name="address" type="text" id="address3" size="25" />
</TD></TR><TR><TD><B><FONT FACE="Courier New" COLOR="#000000"> City: </FONT></B>
</TD><TD> <input name="city" type="text" id="city3" size="25" />
</TD></TR><TR><TD><B><FONT FACE="Courier New" COLOR="#000000"> State: </FONT></B>
</TD><TD> <input name="state" type="text" id="state3" size="25" />
</TD></TR><TR><TD><B><FONT FACE="Courier New" COLOR="#000000"> Zip: </FONT></B>
</TD><TD><input name="zip" type="text" id="state3" size="25" /></TD>
</TR><TR><TD><B><FONT FACE="Courier New" COLOR="#000000"> Fax: </FONT></B>
</TD><TD><input name="fax" type="text" id="state3" size="25" />
</TD></TR></TABLE>
<BR>
<FONT COLOR="#000000"><b>Which Vacation Home are you interested in?</b></FONT>
<br>
<SELECT NAME="lodging_type">
<OPTION>Island View I - (1)
<OPTION>Island View II - (2)
</SELECT>
<P>
<FONT COLOR="#000000"><B>Number in Party:</B> Adults
<input name="adults" type="text" id="state3" size="3" />
Children
<input name="children" type="text" id="state3" size="3" />
<P> <FONT COLOR="#000000"><B>Requested Arrival Date:</B><BR>
1st choice
<input name="1st_choice" type="text" id="1st_choice3" size="10" />
2nd choice
<input name="2nd_choice" type="text" id="2nd_choice3" size="10" />
</FONT>
<P> <FONT COLOR="#000000"><B>Length of Stay:</B> Days
<input name="days" type="text" id="1st_choice3" size="2" />
Week(s)
<input name="week" type="text" id="1st_choice3" size="2" />
</FONT>
<P> <FONT COLOR="#000000" SIZE=+1>I'm also interested in reserving:</FONT>
<INPUT type=checkbox name="extras" value="Pontoon Boat">
Pontoon Boat
<P> <FONT COLOR="#000000" SIZE=+1>Special Requests, Questions, or
Comments :</FONT> <span class="MediumText"><strong> <br>
<textarea name="description" cols="60" rows="7" id="textarea2"></textarea>
</strong></span></FONT>
<P>
<INPUT NAME="Submit" TYPE="submit" VALUE="Submit"><INPUT NAME="name" TYPE="reset" VALUE="Clear Form"></FORM>
sendmail.php
<?php # Script 2.2 - sendmail.php
$name = $POST['name'];
$email = $POST['email'];
$phone = $POST['phone'];
$address = $POST['address'];
$city = $POST['city'];
$state = $POST['state'];
$zip = $POST['zip'];
$fax = $POST['fax'];
$lodging type = $POST['lodging_type'];
$adults = $POST['adults'];
$children = $POST['children'];
$1st_choice= $POST['1st_choice'];
$2nd_choice = $POST['2nd_choice'];
$days = $POST['days'];
$week = $POST['week'];
$Pontoon Boat = $POST['extras'];
$description = $_POST['description'];
$msgbody = "Email: $email\nName: $name\nEmail: $email\nPhone: $phone\nAddress: $address\
nCity: $city\nState: $state\nZip: $zip\nFax: $fax\nLodging_type: $lodging_type\nAdults: $adults\nChildren: $children\
n1st_choice: $1st_choice\n2nd_choice: $2nd_choice\nDays: $days\nWeek: $week\nExtras: $extras\nDescription: $description";
@mail("info@lpalm.com", "EagleRiverRentals.com: Contact Us Form", stripslashes($msgbody), "From: $email");
echo "Thank you, <b>$name</b> for your interest in our properties.
We will reply to you at <i>$email</i>.<br>
View our other vacation properties at:<br>
<a href="http://www.lpalm.com">LPalm.com</a><br>
or
<a href="http://www.islandviewlodge.com">IslandViewLodge.com</a><br>
</p>";
?>