Jump to content

Please help!!! Before I throw this computer out the window!


dsmith01

Recommended Posts

I recently built a site for a rental property and everything was working well.  Yesterday, I wanted to change the "contact us" form into a rental application form.  The previous contact form works perfectly (www.558washingtonst.com/contact_us.php).  I made the changes and I now get an error - (www.558washingtonst.com/contact_us3.php).

 

"Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /home/content/d/e/r/derricksmith01/html/contact_us3.php on line 43"

 

I've looked at line 43 and the surrounding lines but I can't seem to locate the missing semi-colon.  All my tags, quotations, and brackets seem to be closed  I'm clearly missing the obvious...what am I missing.

 

I've attached the php code; hopefully someone out there can find what I've missed.  Thanks for taking a look.

 

Derrick 

 

[attachment deleted by admin]

The posted code does not generate that error, but the errors it does generate are because you started variable names with numbers. Add a number to the end of a variable name to create a new variable name, not at the start of the variable name.

I couldn't see an issue around line 43 either, but just a tip while I'm here - It's quicker to type

<?php
foreach($_POST as $k => $v) $$k = stripslashes($v);
?>

Than it is to type

<?php
$firstname = stripslashes($_POST['firstname']);


$lastname = stripslashes($_POST['lastname']);


$phone1 = stripslashes($_POST['phone1']);


$phone2 = stripslashes($_POST['phone2']);


$phone3 = stripslashes($_POST['phone3']);


$dobmo = stripslashes($_POST['dobmo']);


$dobda = stripslashes($_POST['dobda']);


$dobyr = stripslashes($_POST['dobyr']);


$ss1 = stripslashes($_POST['ss1']);


$ss2 = stripslashes($_POST['ss2']);


$ss3 = stripslashes($_POST['ss3']);


$dl1 = stripslashes($_POST['dl1']);


$dl2 = stripslashes($_POST['dl2']);


$dl3 = stripslashes($_POST['dl3']);


$dlstate = stripslashes($_POST['dlstate']);


$dlexp1 = stripslashes($_POST['dlexp1']);


$dlexp2 = stripslashes($_POST['dlexp2']);


$dlexp3 = stripslashes($_POST['dlexp3']);


$curaddress = stripslashes($_POST['curaddress']);


$curcity = stripslashes($_POST['curcity']);


$curstate = stripslashes($_POST['curstate']);


$rentorown1st = stripslashes($_POST['rentorown1st']);


$1stlandlord = stripslashes($_POST['1stlandlord']);


$1stphone1 = stripslashes($_POST['1stphone1']);


$1stphone2 = stripslashes($_POST['1stphone2']);


$1stphone3 = stripslashes($_POST['1stphone3']);


$1stmo = stripslashes($_POST['1stmo']);


$1styr = stripslashes($_POST['1styr']);


$1streason = stripslashes($_POST['1streason']);


$preaddress = stripslashes($_POST['preaddress']);


$precity = stripslashes($_POST['precity']);


$prestate = stripslashes($_POST['prestate']);


$rentorown2nd = stripslashes($_POST['rentorown2nd']);


$2stlandlord = stripslashes($_POST['2ndlandlord']);


$2ndphone1 = stripslashes($_POST['2ndphone1']);


$2ndphone2 = stripslashes($_POST['2ndphone2']);


$2ndphone3 = stripslashes($_POST['2ndphone3']);


$2ndmo = stripslashes($_POST['2ndmo']);


$2ndyr = stripslashes($_POST['2ndyr']);


$2ndreason = stripslashes($_POST['2ndreason']);


$employer = stripslashes($_POST['employer']);


$position = stripslashes($_POST['position']);


$moincome = stripslashes($_POST['moincome']);


$empphone1 = stripslashes($_POST['empphone1']);


$empphone2 = stripslashes($_POST['empphone2']);


$empphone3 = stripslashes($_POST['empphone3']);


$timeatempmo = stripslashes($_POST['timeatempmo']);


$timeatempyr = stripslashes($_POST['timeatempyr']);


$othersource = stripslashes($_POST['othersource']);


$empaddress = stripslashes($_POST['empaddress']);


$empcity = stripslashes($_POST['empcity']);


$empstate = stripslashes($_POST['empstate']);


$pets = stripslashes($_POST['pets']);


$eviction = stripslashes($_POST['eviction']);


$ref1 = stripslashes($_POST['ref1']);


$ref1phone1 = stripslashes($_POST['ref1phone1']);


$ref1phone2 = stripslashes($_POST['ref1phone2']);


$ref1phone3 = stripslashes($_POST['ref1phone3']);


$ref2 = stripslashes($_POST['ref2']);


$ref2phone1 = stripslashes($_POST['ref2phone1']);


$ref2phone2 = stripslashes($_POST['ref2phone2']);


$ref2phone3 = stripslashes($_POST['ref2phone3']);


$ref3 = stripslashes($_POST['ref3']);


$ref3phone1 = stripslashes($_POST['ref3phone1']);


$ref3phone2 = stripslashes($_POST['ref3phone2']);


$ref3phone3 = stripslashes($_POST['ref3phone3']);


$numadults = stripslashes($_POST['numadults']);


$numchildren = stripslashes($_POST['numchildren']);


$adult1 = stripslashes($_POST['adult1']);


$adultrelation1 = stripslashes($_POST['adultrelation1']);


$adult2 = stripslashes($_POST['adult2']);


$adultrelation2 = stripslashes($_POST['adultrelation2']);


$adult3 = stripslashes($_POST['adult3']);


$adultrelation3 = stripslashes($_POST['adultrelation3']);


$adult4 = stripslashes($_POST['adult4']);


$adultrelation4 = stripslashes($_POST['adultrelation4']);


$email = stripslashes($_POST['email']);


$message = stripslashes($_POST['message']);


$certify = stripslashes($_POST['certify']);
?>

All varibles beginning with numbers have been changed.  I uploaded the new file to the web server and I'm still getting an error.

 

"Error on line 43"

 

Did I miss something else?  Could this problem be server side?  Is there a way to setup some type of error trigger to figure this out. 

 

I appriciate all the help!

 

 

<?php
session_start();

function form_display() {
echo '<form method="post" id="form1" class="form" action="contact_us3.php">
<table align="center" cellpadding="2" cellspacing="0">
<tr>
<td><label for="name"><span class="pintext">
First Name</span></label></td>
<td><div align="left" class="string">
<input class="firstname" type="text" name="firstname" id="firstname" size="12" />
</div>
</td>
<td><label for="name"><span class="pintext">
Last Name</span></label></td>
<td><div align="left" class="string">
<input class="lastname" type="text" name="lastname" id="lastname" size="12" />
</div>
</td>
<td><label for="phone"><span class="pintext">Phone Number</span></label></td>
<td><div align="left" class="string">
<input class="phone1" type="text" name="phone1" id="phone1" size="3" maxlength="3" />
<input class="phone2" type="text" name="phone2" id="phone2" size="3" maxlength="3" />
<input class="phone3" type="text" name="phone3" id="phone3" size="4" maxlength="4" />
</div>
</td>
<td><label for="dob"><span class="pintext">DOB (mm-dd-yy)</span></label></td>
<td><div align="left" class="string">
<input class="dobmo" type="text" name="dobmo" id="dobmo" size="2" maxlength="2"/>
<input class="dobda" type="text" name="dobda" id="dobda" size="2" maxlength="2"/>
<input class="dobyr" type="text" name="dobyr" id="dobyr" size="2" maxlength="2"/>
</div>
</td>
</tr>
<tr>
<td><label for="ss"><span class="pintext">Social Security</span></label></td>
<td><div align="left" class="string">
<input class="ss1" type="text" name="ss1" id="ss1" size="3" maxlength="3"/>
<input class="ss2" type="text" name="ss2" id="ss2" size="3" maxlength="3"/>
<input class="ss3" type="text" name="ss3" id="ss3" size="4" maxlength="4"/>
</div>
</td>
<td><label for="driverslic"><span class="pintext">Drivers License</span></label></td>
<td><div align="left" class="string">
<input class="dl1" type="text" name="dl1" id="dl1" size="2" maxlength="2"/>
<input class="dl2" type="text" name="dl2" id="dl2" size="3" maxlength="3"/>
<input class="dl3" type="text" name="dl3" id="dl3" size="4" maxlength="4"/>
</div>
</td>
<td><label for="dlstate"><span class="pintext">State</span></label></td>
<td><div align="left" class="string">
<input class="dlstate" type="text" name="dlstate" id="dlstate" size="2" maxlength="2"/>
</div>
</td>
<td><label for="dlexp"><span class="pintext">Expires (mm/dd/yy)</span></label></td>
<td><div align="left" class="string">
<input class="dlexp1" type="text" name="dlexp1" id="dlexp1" size="2" maxlength="2"/>
<input class="dlexp2" type="text" name="dlexp2" id="dlexp2" size="2" maxlength="2"/>
<input class="dlexp3" type="text" name="dlexp3" id="dlexp3" size="2" maxlength="2"/>
</div>
</td>
</tr>
<tr>
<td><label for="curaddress"><span class="pintext">Current Address</span></label></td>
<td><div align="left" class="string">
<input class="curaddress" type="text" name="curaddress" id="curaddress" size="28" />
</div>
</td>
<td><label for="curcity"><span class="pintext">City</span></label></td>
<td><div align="left" class="string">
<input class="curcity" type="text" name="curcity" id="curcity" size="10" />
</div>
</td>
<td><label for="curstate"><span class="pintext">State</span></label></td>
<td><div align="left" class="string">
<input class="curstate" type="text" name="curstate" id="curstate" size="2" />
</div>
</td>
</tr>
<tr>
<td><label for="rentorown1st"><span class="pintext">Rent or Own</span></label></td>
<td><div align="left" class="string">
<select name="rentorown1st">
	<option value=""></option>
	<option value="rent">Rent</option>
	<option value="own">Own</option>
</select>
</div>
</td>
<td><label for="firstlandlord"><span class="pintext">Landlord</span></label></td>
<td><div align="left" class="string">
<input class="firstlandlord" type="text" name="firstlandlord" id="firstlandlord" size="20" />
</div>
</td>
<td><label for="firstlandlordphone"><span class="pintext">Phone Number</span></label></td>
<td><div align="left" class="string">
<input class="firstphone1" type="text" name="firstphone1" id="firstphone1" size="3" maxlength="3"/>
<input class="firstphone2" type="text" name="firstphone2" id="firstphone2" size="3" maxlength="3"/>
<input class="firstphone3" type="text" name="firstphone3" id="firstphone3" size="4" maxlength="4"/>
</div>
</td>
</tr>
<tr>
<td><label for="timeat1st"><span class="pintext">How Long at This Address</span></label></td>
<td><div align="left" class="string">
<input class="secondmo" type="text" name="secondmo" id="secondmo" size="2" maxlength="2"/>
<input class="secondyr" type="text" name="secondyr" id="secondyr" size="2" maxlength="2"/>
</div>
</td>
<td><label for="firstreason"><span class="pintext">Reason For Leaving</span></label></td>
<td><div align="left" class="string">
<input class="firstreason" type="text" name="firstreason" id="firstreason" size="28" />
</div>
</td>
<tr>
<td><label for="preaddress"><span class="pintext">Previous Address</span></label></td>
<td><div align="left" class="string">
<input class="preaddress" type="text" name="preaddress" id="preaddress" size="28" />
</div>
</td>
<td><label for="precity"><span class="pintext">City</span></label></td>
<td><div align="left" class="string">
<input class="precity" type="text" name="precity" id="precity" size="10" />
</div>
</td>
<td><label for="prestate"><span class="pintext">State</span></label></td>
<td><div align="left" class="string">
<input class="prestate" type="text" name="prestate" id="prestate" size="2" />
</div>
</td>
</tr>
<tr>
<td><label for="rentorown2nd"><span class="pintext">Rent or Own</span></label></td>
<td><div align="left" class="string">
<select name="rentorown2nd">
	<option value=""></option>
	<option value="rent">Rent</option>
	<option value="own">Own</option>
</select>
</div>
</td>
<td><label for="secondlandlord"><span class="pintext">Landlord</span></label></td>
<td><div align="left" class="string">
<input class="secondlandlord" type="text" name="secondlandlord" id="secondlandlord" size="20" />
</div>
</td>
<td><label for="2ndlandlordphone"><span class="pintext">Phone Number</span></label></td>
<td><div align="left" class="string">
<input class="secondphone1" type="text" name="secondphone1" id="secondphone1" size="3" maxlength="3"/>
<input class="sedondphone2" type="text" name="secondphone2" id="secondphone2" size="3" maxlength="3"/>
<input class="secondphone3" type="text" name="secondphone3" id="secondphone3" size="4" maxlength="4"/>
</div>
</td>
</tr>
<tr>
<td><label for="timeat2nd"><span class="pintext">How Long at This Address</span></label></td>
<td><div align="left" class="string">
<input class="secondmo" type="text" name="secondmo" id="secondmo" size="2" maxlength="2"/>
<input class="secondyr" type="text" name="secondyr" id="secondyr" size="2" maxlength="2"/>
</div>
</td>
<td><label for="secondreason"><span class="pintext">Reason For Leaving</span></label></td>
<td><div align="left" class="string">
<input class="secondreason" type="text" name="secondreason" id="secondreason" size="28" />
</div>
</td>
</tr>
<tr>
<td><label for="employer"><span class="pintext">Present Employer</span></label></td>
<td><div align="left" class="string">
<input class="employer" type="text" name="employer" id="employer" size="20" />
</div>
</td>
<td><label for="position"><span class="pintext">Position</span></label></td>
<td><div align="left" class="string">
<input class="position" type="text" name="position" id="position" size="20" />
</div>
</td>
<td><label for="moincome"><span class="pintext">Monthly Income</span></label></td>
<td><div align="left" class="string">
<input class="moincome" type="text" name="moincome" id="moincome" size="6" />
</div>
</td>
</tr>
<tr>
<td><label for="empphone"><span class="pintext">Phone Number</span></label></td>
<td><div align="left" class="string">
<input class="empphone1" type="text" name="empphone1" id="empphone1" size="3" maxlength="3"/>
<input class="empphone2" type="text" name="empphone2" id="empphone2" size="3" maxlength="3"/>
<input class="empphone3" type="text" name="empphone3" id="empphone3" size="4" maxlength="4"/>
</div>
</td>
<td><label for="timeatemp"><span class="pintext">How Long at Job</span></label></td>
<td><div align="left" class="string">
<input class="timeatempmo" type="text" name="timeatempmo" id="timeatempmo" sizeo="2" maxlength="2"/>
<input class="timeatempyr" type="text" name="timeatempyr" id="timeatempyr" size="2" maxlength="2"/>
</div>
</td>
<td><label for="othersource"><span class="pintext">Other Source of Income</span></label></td>
<td><div align="left" class="string">
<input class="othersource" type="text" name="othersource" id="othersource" size="28" />
</div>
</td>
</tr>
<tr>
<td><label for="empaddress"><span class="pintext">Employer;s Address</span></label></td>
<td><div align="left" class="string">
<input class="empaddress" type="text" name="empaddress" id="empaddress" size="28" />
</div>
</td>
<td><label for="empcity"><span class="pintext">City</span></label></td>
<td><div align="left" class="string">
<input class="empcity" type="text" name="empcity" id="empcity" size="10" />
</div>
</td>
<td><label for="empstate"><span class="pintext">State</span></label></td>
<td><div align="left" class="string">
<input class="empstate" type="text" name="empstate" id="empstate" size="2" />
</div>
</td>
</tr>
<tr>
<td><label for="pets"><span class="pintext">Number of Pets</span></label></td>
<td><div align="left" class="string">
<input class="pets" type="text" name="pets" id="pets" size="2" />
</div>
</td>
<td><label for="eviction"><span class="pintext">Ever Been Party to an Eviction?</span></label></td>
<td><div align="left" class="string">
<select name="rentorown2nd">
	<option value=""></option>
	<option value="yes">Yes</option>
	<option value="no">No</option>
</select>
</div>
</td>
</tr>
<tr>
<td><label for="ref1"><span class="pintext">Personal Reference</span></label></td>
<td><div align="left" class="string">
<input class="ref1" type="text" name="ref1" id="ref1" size="20" />
</div>
</td>
<td><label for="ref1phone"><span class="pintext">Phone Number</span></label></td>
<td><div align="left" class="string">
<input class="ref1phone1" type="text" name="ref1phone1" id="ref1phone1" size="3" maxlength="3"/>
<input class="ref1phone2" type="text" name="ref1phone2" id="ref1phone2" size="3" maxlength="3"/>
<input class="ref1phone3" type="text" name="ref1phone3" id="ref1phone3" size="4" maxlength="4"/>
</div>
</td>
</tr>
<tr>
<td><label for="ref2"><span class="pintext">Personal Reference</span></label></td>
<td><div align="left" class="string">
<input class="ref2" type="text" name="ref2" id="ref2" size="20" />
</div>
</td>
<td><label for="ref2phone"><span class="pintext">Phone Number</span></label></td>
<td><div align="left" class="string">
<input class="ref2phone1" type="text" name="ref2phone1" id="ref2phone1" size="3" maxlength="3"/>
<input class="ref2phone2" type="text" name="ref2phone2" id="ref2phone2" size="3" maxlength="3"/>
<input class="ref2phone3" type="text" name="ref2phone3" id="ref2phone3" size="4" maxlength="4"/>
</div>
</td>
</tr>
<tr>
<td><label for="ref3"><span class="pintext">Personal Reference</span></label></td>
<td><div align="left" class="string">
<input class="ref3" type="text" name="ref3" id="ref3" size="20" />
</div>
</td>
<td><label for="ref3phone"><span class="pintext">Phone Number</span></label></td>
<td><div align="left" class="string">
<input class="ref3phone1" type="text" name="ref3phone1" id="ref3phone1" size="3" maxlength="3"/>
<input class="ref3phone2" type="text" name="ref3phone2" id="ref3phone2" size="3" maxlength="3"/>
<input class="ref3phone3" type="text" name="ref3phone3" id="ref3phone3" size="4" maxlength="4"/>
</div>
</td>
</tr>
<tr>
<td><label for="numadults"><span class="pintext">Total Number of Adults</span></label></td>
<td><div align="left" class="string">
<select name="numadults">
	<option value="1">1</option>
	<option value="2">2</option>
	<option value="3">3</option>
	<option value="4">4</option>
</select>
</div>
</td>
	<td><label for="numchildren"><span class="pintext">Total Number of Children Under 18</span></label></td>
<td><div align="left" class="string">
<select name="numchildren">
	<option value="0">0</option>
	<option value="1">1</option>
	<option value="2">2</option>
	<option value="3">3</option>
	<option value="4">4</option>
</select>
</div>
</td>
<tr>
<td><label for="adult1"><span class="pintext">1 Adult Name</span></label></td>
<td><div align="left" class="string">
<input class="adult1" type="text" name="adult1" id="adult1" size="20" />
</div>
</td>
<td><label for="adultrelation1"><span class="pintext">Relationship</span></label></td>
<td><div align="left" class="string">
<input class="adultrelation1" type="text" name="adultrelation1" id="adultrelation1" size="20" />
</div>
</td>
</tr>
<tr>
<td><label for="adult2"><span class="pintext">2 Adult Name</span></label></td>
<td><div align="left" class="string">
<input class="adult2" type="text" name="adult2" id="adult2" size="20" />
</div>
</td>
<td><label for="adultrelation2"><span class="pintext">Relationship</span></label></td>
<td><div align="left" class="string">
<input class="adultrelation2" type="text" name="adultrelation2" id="adultrelation2" size="20" />
</div>
</td>
</tr>
<tr>
<td><label for="adult3"><span class="pintext">3 Adult Name</span></label></td>
<td><div align="left" class="string">
<input class="adult3" type="text" name="adult3" id="adult3" size="20" />
</div>
</td>
<td><label for="adultrelation3"><span class="pintext">Relationship</span></label></td>
<td><div align="left" class="string">
<input class="adultrelation3" type="text" name="adultrelation3" id="adultrelation3" size="20" />
</div>
</td>
</tr>
<tr>
<td><label for="adult4"><span class="pintext">4 Adult Name</span></label></td>
<td><div align="left" class="string">
<input class="adult4" type="text" name="adult4" id="adult4" size="20" />
</div>
</td>
<td><label for="adultrelation4"><span class="pintext">Relationship</span></label></td>
<td><div align="left" class="string">
<input class="adultrelation4" type="text" name="adultrelation4" id="adultrelation4" size="20" />
</div>
</td>
</tr>
<tr>
<td><label for="email"><span class="pintext">
Email</span></label></td>
<td><div align="left" class="string">
<input class="email" type="text" name="email" id="email" size="28" />
</div>
</td>
<td><label for="message"<span class="pintext">message</span></label></td>
<td><div align="left" clas="string">
<input class="message" type"textbox" name="message" id="message" cols"20" rows="2" />
</div>
</td>
</tr>
<tr>
<td><label for="certify"<span class="pintext">I CERTIFY that answers given herein are true and complete to the best of my knowledge. I authorize investigation of all statements contained in this application for tenant screening as may be necessary in arriving at a tenant decision, I understand that the landlord may terminate any rental agreement entered into for any misrepresentations made above.</span></label></td>
<td><div align="left" class="string">
<input class="certify" type"radio" name="certify" id="certify" value="yes" />Yes
<input class="certify" type"radio" name="certify" id="certify" value="no" />No
</div>
</td>
</tr>
<tr>
<td><label for="code"><span  class="pintext">
Validate Code</span></label></td>
<td><div align="left" class="string">
<img src="\captcha.php" width="140" height="50">
<input class="code" type="text" name="code" id="code" size="7" />										  
</div>
</td>
</tr>
<tr>
<td colspan="2"><div align="right">
<input class="buttons" type="submit" name="Send message" id="Send message" value="Send message →" /></div>
</td>
</tr>
</table>
</form>';
}

function validate_form ($firstname, $lastname, $email) {
if ((empty($firstname)) || (empty($lastname)) || (empty($email))) {
	global $error;
	$error = 'Error! You didn\'t fill all the required fields (First Name, Last Name and E-mail are required).';
	return false;
} elseif (!eregi('^([._a-z0-9-]+[._a-z0-9-]*)@(([a-z0-9-]+\.)*([a-z0-9-]+)(\.[a-z]{2,3})?)$', $email)) {
	global $error;
	$error = 'Error! You didn\'t enter a valid e-mail address.';
	return false;
} elseif(md5($_POST['code']) != $_SESSION['key'])  {
	global $error;
	$error = 'Error! Incorrect security code';
} else {
	global $error;
	$error = 'Email was sent sucessfully. Thank You! ';
	return true;
}
}

if (count($_POST) > 0) {
$to = '[email protected]';
$firstname = stripslashes($_POST['firstname']);
$lastname = stripslashes($_POST['lastname']);
$phone1 = stripslashes($_POST['phone1']);
$phone2 = stripslashes($_POST['phone2']);
$phone3 = stripslashes($_POST['phone3']);
$dobmo = stripslashes($_POST['dobmo']);
$dobda = stripslashes($_POST['dobda']);
$dobyr = stripslashes($_POST['dobyr']);
$ss1 = stripslashes($_POST['ss1']);
$ss2 = stripslashes($_POST['ss2']);
$ss3 = stripslashes($_POST['ss3']);
$dl1 = stripslashes($_POST['dl1']);
$dl2 = stripslashes($_POST['dl2']);
$dl3 = stripslashes($_POST['dl3']);
$dlstate = stripslashes($_POST['dlstate']);
$dlexp1 = stripslashes($_POST['dlexp1']);
$dlexp2 = stripslashes($_POST['dlexp2']);
$dlexp3 = stripslashes($_POST['dlexp3']);
$curaddress = stripslashes($_POST['curaddress']);
$curcity = stripslashes($_POST['curcity']);
$curstate = stripslashes($_POST['curstate']);
$rentorown1st = stripslashes($_POST['rentorown1st']);
$firstlandlord = stripslashes($_POST['firstlandlord']);
$firstphone1 = stripslashes($_POST['firstphone1']);
$firstphone2 = stripslashes($_POST['firstphone2']);
$firstphone3 = stripslashes($_POST['firstphone3']);
$firstmo = stripslashes($_POST['firstmo']);
$firstyr = stripslashes($_POST['firstyr']);
$firstreason = stripslashes($_POST['firstreason']);
$preaddress = stripslashes($_POST['preaddress']);
$precity = stripslashes($_POST['precity']);
$prestate = stripslashes($_POST['prestate']);
$rentorown2nd = stripslashes($_POST['rentorown2nd']);
$socondlandlord = stripslashes($_POST['secondlandlord']);
$secondphone1 = stripslashes($_POST['secondphone1']);
$secondphone2 = stripslashes($_POST['secondphone2']);
$secondphone3 = stripslashes($_POST['secondphone3']);
$secondmo = stripslashes($_POST['secondmo']);
$secondyr = stripslashes($_POST['secondyr']);
$secondreason = stripslashes($_POST['secondreason']);
$employer = stripslashes($_POST['employer']);
$position = stripslashes($_POST['position']);
$moincome = stripslashes($_POST['moincome']);
$empphone1 = stripslashes($_POST['empphone1']);
$empphone2 = stripslashes($_POST['empphone2']);
$empphone3 = stripslashes($_POST['empphone3']);
$timeatempmo = stripslashes($_POST['timeatempmo']);
$timeatempyr = stripslashes($_POST['timeatempyr']);
$othersource = stripslashes($_POST['othersource']);
$empaddress = stripslashes($_POST['empaddress']);
$empcity = stripslashes($_POST['empcity']);
$empstate = stripslashes($_POST['empstate']);
$pets = stripslashes($_POST['pets']);
$eviction = stripslashes($_POST['eviction']);
$ref1 = stripslashes($_POST['ref1']);
$ref1phone1 = stripslashes($_POST['ref1phone1']);
$ref1phone2 = stripslashes($_POST['ref1phone2']);
$ref1phone3 = stripslashes($_POST['ref1phone3']);
$ref2 = stripslashes($_POST['ref2']);
$ref2phone1 = stripslashes($_POST['ref2phone1']);
$ref2phone2 = stripslashes($_POST['ref2phone2']);
$ref2phone3 = stripslashes($_POST['ref2phone3']);
$ref3 = stripslashes($_POST['ref3']);
$ref3phone1 = stripslashes($_POST['ref3phone1']);
$ref3phone2 = stripslashes($_POST['ref3phone2']);
$ref3phone3 = stripslashes($_POST['ref3phone3']);
$numadults = stripslashes($_POST['numadults']);
$numchildren = stripslashes($_POST['numchildren']);
$adult1 = stripslashes($_POST['adult1']);
$adultrelation1 = stripslashes($_POST['adultrelation1']);
$adult2 = stripslashes($_POST['adult2']);
$adultrelation2 = stripslashes($_POST['adultrelation2']);
$adult3 = stripslashes($_POST['adult3']);
$adultrelation3 = stripslashes($_POST['adultrelation3']);
$adult4 = stripslashes($_POST['adult4']);
$adultrelation4 = stripslashes($_POST['adultrelation4']);
$email = stripslashes($_POST['email']);
$message = stripslashes($_POST['message']);
$certify = stripslashes($_POST['certify']);
$new_message = "Name: $firstname $lastname\nPhone: $phone1-$phone2-$phone3\nDOB: $dobmo-$dobda-$dobyr\nSocial Security: $ss1-$ss2$ss3\nDrivers License: $dl1-$dl2-$dl3  State: $dlstate  Exp.: $dlexp1-$dlexp2-$dlexp3\nCurrent Address: $curaddress\nCity: $curcity  State: $curstate\nRent or Own: $rentorown1st  Landlord Name: $firstlandlord  Landlord Phone: $firstphone1-$firstphone2-$firstphone3\nHow long at Current Address: $firstmo-$firstyr\nReason For Leaving: $firstreason\nPrevious Address: $preaddress\nCity: $precity  State: $prestate\nRent or Own: $rentorown2nd  Landlord Name: $secondlandlord  Landlord Phone: $secondphone1-$secondphone2-$secondphone3\nHow long at Previous Address: $secondmo-$secondyr\nReason For Leaving: $secondreason\nEmployer: $employer  Position: $position  Monthly Income: $moincome\nEmployer Phone: $empphone1-$empphone1-$empphone3  Time at Job: $timeatempmo-$timeatempyr  Other Source of Income: $othersource\nEmployer Address: $empaddress  City: $empcity  State $empstate\n  Pets: $pets  Ever Been Evicted: $eviction\nReference 1: ref1 $ref1phone1-$ref1phone2-$ref1phone3\nReference 2: ref2 $ref2phone1-$ref2phone2-$ref2phone3\nReference 3: ref3 $ref3phone1-$ref3phone2-$ref3phone3\nNumber of Adults: $numadults  Number of Children: $numchildren\nAdult 1: $adult1  Relationship: $adultrelation1\nAdult 2: $adult2  Relationship: $adultrelation2\nAdult 3: $adult3  Relationship: $adultrelation3\nAdult 4: $adult4  Relationship: $adultrelation4\nEmail: $email\n\nMessage:\n\n $message\n\nApprove Background Check: $certify";
$subject = "New Message From 558Washingtonst";	
$headers = "From: $firstname $lastname <$email> \r\nReply-To:$email\r\nContent-Type: text/plain; charset=UTF-8\r\nX-Mailer: PHP/".phpversion();
if(validate_form($firstname, $lastname, $email)) {
	mail($to, $subject, $new_message, $headers);
}
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>558 Washington St #201</title>
<meta name="keywords" content="" />
<meta name="description" content="" />
<link href="style.css" rel="stylesheet" type="text/css" media="screen" />
</head>
<body>
<!-- start header -->
<div id="header">
<h1>558washingtonst.com</h1>
</div>
<!-- end header -->
<div id="banner">
<h2>Condo For Rent</h2>
<h3><i>$1050 Monthly</i></h3>
</div>
<!-- start page -->
<div id="wrapper">
<div id="page">
	<div class="bgtop">
		<div class="bgbtm">
			<!-- start content -->
			<div id="content">
				<div class="post">
					<h1 class="title"> Contact Us</h1>
					<div class="entry">
						<div class="wrapper">

							<?php
							if (isset($error)) {
							echo $error;
							form_display();
							} else {
							form_display();
							}
							?>

						</div>
					</div>
				</div>
			</div>
			<!-- end content -->
			<!-- start sidebar -->
			<div id="sidebar">
				<ul>
					<li>
						<h2>Menu</h2>
						<ul>
							<li><a href="/index.php">Home</a></li>
							<li><a href="/pictures.php">Pictures</a></li>
							<li><a href="http://maps.google.com/maps?f=q&hl=en&geocode=&q=558+Washington+St,+Denver,+CO&sll=37.0625,-95.677068&sspn=50.51141,78.75&ie=UTF8&z=14&ll=39.734914,-104.974537&source=embed" style="color:#0000FF;text-align:left" target="_blank">Map</a></small></li>
							<li><a href="/contact_us.php">Contact Us</a></li>
						</ul>
					</li>
					<li>
						<h2>Neighborhood Info</h2>
						<ul>
							<li><a href="http://en.wikipedia.org/wiki/Alamo_Placita" target="_blank">Wiki - Alamo Placita</a></li>
							<li><a href="http://www.denvergov.org/Portals/337/documents/7speer.pdf" target="_blank">2007 Crime Statistics</a></li>
						</ul>
					</li>
					<li>
						<h2>Links</h2>
						<ul>
							<li><a href="/index.php" onclick="window.open('/calculator.php','window','height=700,width=500')">Mortgage Calculator</a></li>
							<li><a href="http://colorado.brokeroutpost.com/loans/mortgage_broker_directory.asp" target="_blank">Mortgage Brokers</a></li>
						</ul>
					</li>
				</ul>
			</div>
			<!-- end sidebar -->
			<div style="clear:both"> </div>
		</div>
	</div>
</div>
</div>
<div id="footer">
<p>©2007 All Rights Reserved  •  Design by Derrick Smith</a></p>
</div>
</body>
</html>

I have tested your code and no syntax errors arose.

 

However what I would suggest you to do is to save that huge block of HTML to en external file (such as contactus_form.html) and then change your form_display function to just

function form_display()
{
    $form  = file_get_contents('contactus.html');
    echo $form;
}

I knew this was going to be something simple!  Appearently, I've been uploading this dang file to the wrong ftp site for the last 4 hours.  I mixed up the addresses - a lot of the files are the same.

 

Thanks, at least I know I'm not completely blind or insane now.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.