I am new to
PHP and I am having a bit of trouble. I am trying to create a
php mail form but I am getting a parse error. I tried following this tutorial.
http://www.webreference.com/programm...hpemail/2.html
Here is my
html...
<form name="form" method="post" action="contact.
php">
<p class="contentsmall">
Required Fields <span class="contentblue">*</span><br />
<br />
Your Company <span class="contentblue">*</span> <br /><input type="text" name="companyname"><br /><br />
Contact Name <span class="contentblue">*</span><br /><input type="text" name="contactname"><br /><br />
Contact Phone <span class="contentblue">*</span><br /><input type="text" name="contactphone"><br /><br />
Contact E-mail <span class="contentblue">*</span><br /><input type="text" name="contactemail" /><br /><br />
Contact Address <span class="contentblue">*</span><br /><input type="text" name="contactaddress" /><br /><br />
Contact City <span class="contentblue">*</span><br /><input type="text" name="contactcity" /><br /><br />
Contact State <span class="contentblue">*</span><br /><input type="text" name="contactstate" /><br /><br />
Contact Zip <span class="contentblue">*</span><br /><input type="text" name="contactzip" /><br /><br /><br />
<span class="contentblue">Property Information</span><br /><br />
Street Address <span class="contentblue">*</span><br /><input type="text" name="streetaddress" /><br /><br />
County <span class="contentblue">*</span><br /><input type="text" name="county" /><br /><br />
City <span class="contentblue">*</span><br /><input type="text" name="city" /><br /><br />
Zip Code <br /><input type="text" name"zipcode" /><br /><br />
Class: <input type="checkbox" name="singlefamily" />Single Family <input type="checkbox" name="multifamily">Multi-Family
<input type="checkbox" name="condo" />Condo<br /><br />
If other please specify<br /><input type="text" name="other" /><br /><br />
Selling Price<br /><input type="text" name="sellingprice" /><br /><br />
Mortgage Amount<br /><input type="text" name="mortgageamount" /><br /><br />
Value Estimate if Refinancing<br /><input type="text" name="valueestimate" /><br /><br /><br />
<span class="contentblue">Owner Information</span><br /><br />
Owner(s)<br /><input type="text" name="owner" /><br /><br />
Home Phone<br /><input type="text" name="homephone" /><br /><br />
Alternate Phone<br /><input type="text" name="alternatephone" /><br /><br /><br />
<span class="contentblue">Borrower/Client</span><br /><br />
Borrower/Client<br /><input type="text" name="borrowerclient" /><br /><br />
Home Phone<br /><input type="text" name="homephone2" /><br /><br />
Alternate Phone<br /><input type="text" name="alternatephone2" /><br /><br /><br />
<span class="contentblue">Real Estate Broker Information</span><br /><br />
Home Phone<br /><input type="text" name="homephone3" /><br /><br />
Alternate Phone<br /><input type="text" name="alternatephone3" /><br /><br /><br />
<span class="contentblue">Comments/Requests</span><br /><br />
If you have any addtional comments, questions, special requests, or information please fill out the input box below. <br /><br />
<textarea name="comments" rows="7" cols="40"></textarea><br /><br />
Hit the "Submit" button and the information you have entered will be sent to us by e-mail. Hit the "Clear" button to reset the form and start from scratch.<br /><br />
<input type="submit" name="Submit" value="Submit">
<input type="reset" name="Reset" value="Clear Form">
</form>
Here is the
php...
<?
php
if (($companyname == "") || ($contactname == "") || ($contactphone == "") || ($contactemail == "") || ($contactaddress == "") || ($contactcity == "") || ($contactstate == "") || ($contactzip == "") || ($streetaddress == "") ($county == "") ($city == ""))
{
echo "<form name=form method=post action=contact.
php>";
echo "Please fill out the fields you missed.";
}
if ($companyname == "")
{
echo "Your Company<br><input type=text name=companyname";
}
else
{
echo "<input type=hidden name=companyname value=$companyname>";
}
if ($contactname == "")
{
echo "Contact Name<br><input type=text name=contactname";
}
else
{
echo "<input type=hidden name=contactname value=$contactname>";
}
if ($contactphone == "")
{
echo "Contact Phone<br><input type=text name=contactphone";
}
else
{
echo "<input type=hidden name=contactphone value=$contactphone>";
}
if ($contactemail == "")
{
echo "Contact E-mail<br><input type=text name=contactemail";
}
else
{
echo "<input type=hidden name=contactemail value=$contactemail>";
}
if ($contactaddress == "")
{
echo "Contact Address<br><input type=text name=contactaddress";
}
else
{
echo "<input type=hidden name=contactaddress value=$contactaddress>";
}
if ($contactcity == "")
{
echo "Contact City<br><input type=text name=contactcity";
}
else
{
echo "<input type=hidden name=contactcity value=$contactcity>";
}
if ($contactstate == "")
{
echo "Contact State<br><input type=text name=contactstate";
}
else
{
echo "<input type=hidden name=contactstate value=$contactstate>";
}
if ($contactzip == "")
{
echo "Contact Zip<br><input type=text name=contactzip";
}
else
{
echo "<input type=hidden name=contactzip value=$contactzip>";
}
if ($streetaddress == "")
{
echo "Street Address<br><input type=text name=streetaddress";
}
else
{
echo "<input type=hidden name=streetaddress value=$streetaddress>";
}
if ($county == "")
{
echo "County<br><input type=text name=county";
}
else
{
echo "<input type=hidden name=county value=$county>";
}
if ($city == "")
{
echo "City<br><input type=text name=city";
}
else
{
echo "<input type=hidden name=city value=$city>";
}
if (($companyname == "") || ($contactname == "") || ($contactphone == "") || ($contactemail == "") || ($contactaddress == "") || ($contactcity == "") || ($contactstate == "") || ($contactzip == "") || ($streetaddress == "") ($county == "") ($city == ""))
{
echo "<input type=submit name=submit value=submit>";
echo "<input type=reset name=Reset value=Clear Form>";
echo "</form>";
}
else
{
$personalinfo = "Contact Name: $contactname\nContact Email: $contactemail\nContact Phone: $contactphone\nContact E-mail: $contacteamil\nContact Address: $contactaddress\nContact City: $contactcity\nContact State: $contactstate\nContact Zip $contactzip";
$propertyinfo = "Street Address: $streetaddress\nCounty: $county\nCity: $city\nZip Code: $zipcode\n Class: $singlefamily, $multifamily, $condo\nIf other please specify: $other\nSelling Price: $sellingprice\n Mortgage Amount: $mortgageamount\nValue Estimage If Refinancing: $valueestimate";
$ownerinfo = "Owner(s): $owner\nHome Phone: $homephone\nAlternate Phone: $alternatephone";
$borrowerinfo = "Borrower/Clinet: $borrowerclient\nHome Phone: $homephone2\nAlternate Phone: $alternatephone2";
$brokerinfo = "Home Phone: $homephone3\nAlternate Phone: $alternatephone3";
$comments = "Comments: $comments";
mail ("eric@sebagowebdesign.com", "Appraisal Request Email", $personalifo, $propertyinfo, $ownerinfo, $borrowerinfo, $brokerinfo, $comments);
echo "Thank you for choosing Jordan Bay Appraisal $contactname.";
echo "A response will be sent to $contactemail as soon as possible>";
?>
Thanks.