Hello there, I am having a problem getting my form to work. When I fill the information in for the first applicant it should automatically fill the application in. However it goes to the page where it states that I have not filled in all fields correctly and to fill them in. The second applicant does not need to be filled out. See the attached code at the bottom.
Thanks in advance--
this is where the form is at..
http://www.derosarentals.com/2006/Application.html
<?php
if (($first1 == "") || ($last1 == "") || ($address1 == "") || ($city1 == "") || ($state1 == "") || ($zip1 == "") || ($dob1 == "") || ($ssn1 == "") || ($driver1 == "") || ($dayPhone1 == "") || ($homePhone1 == "") || ($occupation1 == "") || ($employer1 == "") || ($empAddress1 == "") || ($city_1 == "") || ($state_1 == "") || ($zip_1 == "") || ($salary1 == "") || ($length1 == "") || ($bank1 == "") || ($bankAddress1 == "") || ($checking1 == "") || ($rent1 == "") || ($landlord1 == "") || ($landlordPhone1 == ""))
{
echo "<form name=form method=post action=verification.php>";
echo "<p class=bodymd>Sorry but you must fill in all fields.</p>";
echo "<p class=bodymd>Fill in the ones you missed, they are listed below.</p>";
}
if ($first1 == "")
{
echo "<p class=bodymd>First Name<br><input type=text name=first1></p>";
}
else
{
echo "<input type=hidden name=first1 value=$first1>";
}
if ($last1 == "")
{
echo "<p class=bodymd>Last Name<br><input type=text name=last1></p>";
}
else
{
echo "<input type=hidden name=last1 value=$last1>";
}
if ($address1 == "")
{
echo "<p class=bodymd>Address<br><input type=text name=address1></p>";
}
else
{
echo "<input type=hidden name=address1 value=$address1>";
}
if ($city1 == "")
{
echo "<p class=bodymd>City<br><input type=text name=city1></p>";
}
else
{
echo "<input type=hidden name=city1 value=$city1>";
}
if ($state1 == "")
{
echo "<p class=bodymd>State<br><input type=text name=state1></p>";
}
else
{
echo "<input type=hidden name=state1 value=$state1>";
}
if ($zip1 == "")
{
echo "<p class=bodymd>Zip<br><input type=text name=zip1></p>";
}
else
{
echo "<input type=hidden name=zip1 value=$zip1>";
}
if ($dob1 == "")
{
echo "<p class=bodymd>Date of Birth<br><input type=text name=dob1></p>";
}
else
{
echo "<input type=hidden name=dob1 value=$dob1>";
}
if ($ssn1 == "")
{
echo "<p class=bodymd>Social Security#<br><input type=text name=ssn1></p>";
}
else
{
echo "<input type=hidden name=ssn1 value=$ssn1>";
}
if ($driver1 == "")
{
echo "<p class=bodymd>Drivers License<br><input type=text name=driver1></p>";
}
else
{
echo "<input type=hidden name=driver1 value=$driver1>";
}
if ($dayPhone1 == "")
{
echo "<p class=bodymd>Day Phone#<br><input type=text name=dayPhone1></p>";
}
else
{
echo "<input type=hidden name=dayPhone1 value=$dayPhone1>";
}
if ($homePhone1 == "")
{
echo "<p class=bodymd>Home Phone#<br><input type=text name=homePhone1></p>";
}
else
{
echo "<input type=hidden name=homePhone1 value=$homePhone1>";
}
if ($occupation1 == "")
{
echo "<p class=bodymd>Occupation<br><input type=text name=occupation1></p>";
}
else
{
echo "<input type=hidden name=occupation1 value=$occupation1>";
}
if ($employer1 == "")
{
echo "<p class=bodymd>Employer<br><input type=text name=employer1></p>";
}
else
{
echo "<input type=hidden name=employer1 value=$employer1>";
}
if ($empAddress1 == "")
{
echo "<p class=bodymd>Employer's Address<br><input type=text name=empAddress1></p>";
}
else
{
echo "<input type=hidden name=empAddress1 value=$empAddress1>";
}
if ($city_1 == "")
{
echo "<p class=bodymd>Employer's City<br><input type=text name=city_1></p>";
}
else
{
echo "<input type=hidden name=city_1 value=$city_1>";
}
if ($state_1 == "")
{
echo "<p class=bodymd>Employer's State<br><input type=text name=state_1></p>";
}
else
{
echo "<input type=hidden name=state_1 value=$state_1>";
}
if ($zip_1 == "")
{
echo "<p class=bodymd>Employers Zip<br><input type=text name=zip_1></p>";
}
else
{
echo "<input type=hidden name=zip_1 value=$zip_1>";
}
if ($salary1 == "")
{
echo "<p class=bodymd>Salary<br><input type=text name=salary1></p>";
}
else
{
echo "<input type=hidden name=salary1 value=$salary1>";
}
if ($length1 == "")
{
echo "<p class=bodymd>Length<br><input type=text name=length1></p>";
}
else
{
echo "<input type=hidden name=length1 value=$length1>";
}
if ($bank1 == "")
{
echo "<p class=bodymd>Bank Name<br><input type=text name=bank1></p>";
}
else
{
echo "<input type=hidden name=bank1 value=$bank1>";
}
if ($bankAddress1 == "")
{
echo "<p class=bodymd>Bank Address<br><input type=text name=bankAddress1></p>";
}
else
{
echo "<input type=hidden name=bankAddress1 value=$bankAddress1>";
}
if ($checking1 == "")
{
echo "<p class=bodymd>Checking Account#<br><input type=text name=checking1></p>";
}
else
{
echo "<input type=hidden name=checking1 value=$checking1>";
}
if ($rent1 == "")
{
echo "<p class=bodymd>Rent Amount<br><input type=text name=rent1></p>";
}
else
{
echo "<input type=hidden name=rent1 value=$rent1>";
}
if ($landlord1 == "")
{
echo "<p class=bodymd>Landlord Name<br><input type=text name=landlord1></p>";
}
else
{
echo "<input type=hidden name=landlord1 value=$landlord1>";
}
if ($landlordPhone1 == "")
{
echo "<p class=bodymd>Landlord Phone#<br><input type=text name=landlordPhone1></p>";
}
else
{
echo "<input type=hidden name=landlordPhone1 value=$landlordPhone1>";
}
if (($first1 == "") || ($last1 == "") || ($address1 == "") || ($city1 == "") || ($state1 == "") || ($zip1 == "") || ($dob1 == "") || ($ssn1 == "") || ($driver1 == "") || ($dayPhone1 == "") || ($homePhone1 == "") || ($occupation1 == "") || ($employer1 == "") || ($empAddress1 == "") || ($city_1 == "") || ($state_1 == "") || ($zip_1 == "") || ($salary1 == "") || ($length1 == "") || ($bank1 == "") || ($bankAddress1 == "") || ($checking1 == "") || ($rent1 == "") || ($landlord1 == "") || ($landlordPhone1 == ""))
{
echo "<input type=submit name=Submit value=Submit>";
echo "<input type=reset name=Reset value=Clear>";
echo "</form>";
}
else
{
$message = "Name: $first1\nlast1: $last1l\ndayPhone1: $dayPhone1\n";
$extra = "From: $first1\r\nReply-To: $dayPhone1\r\n";
mail ("kovacs@new-era-designs.com", "Website Email", $message, $extra);
echo "<h4 align=center>Thanks for your inguiry, $first1.</p>";
echo "<h4 align=center>A response will be sent to you at $Email as soon as possible.</p>";
echo "<center><a href='contact.htm'>Back</a>";
}
?>