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>";
}
?>

    rincewind456 wrote:

    That's not all the code (hideous as it is) is it?

    That is the verification.php code only.

    Now, if I change everything to use my .pl form I get this error.

    Forbidden
    You don't have permission to access /cgi-bin/verification.pl on this server.

    Apache/1.3.34 Server at www.derosarentals.com Port 80

    Now, I don't have Apache installed on this computer. Do I need to install it? If you go to the site right now, it will try to pull the .pl file, not the .php file. I am trying different ways right now to get this thing working.

      In your first post you say

      When I fill the information in for the first applicant it should automatically fill the application in

      and then post the code for the verification page, I would have thought that if it's meant to fill in the boxes then there would be some code there for it, I see none.

      In your second post your on about .pl files, I'm not sure but isn't that perl, what has that to do with this problem.

      Also I have no idea what your on about here

      Now, if I change everything to use my .pl form I get this error.

      Forbidden
      You don't have permission to access /cgi-bin/verification.pl on this server.

      Apache/1.3.34 Server at www.derosarentals.com Port 80

      Now, I don't have Apache installed on this computer. Do I need to install it? If you go to the site right now, it will try to pull the .pl file, not the .php file. I am trying different ways right now to get this thing working.

      I have no idea where This Computer is but I would assume that the server your running a script from that gives that warning already has Apache installed

        This is the actual form....sorry.

        <html>
        <head>

        <title>Application</title>
        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
        <link rel="stylesheet" href="mm_derosa.css" type="text/css" />
        </head>
        <body bgcolor="#0066cc">
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr bgcolor="#99ccff">
        <td width="15" nowrap="nowrap">&nbsp;</td>
        <td width="745" height="60" colspan="3" class="logo" nowrap="nowrap"><br />
        Application <span class="tagline">| DeRosa Rentals </span></td>
        <td width="100%">&nbsp;</td>
        </tr>

        <tr bgcolor="#003399">
        <td width="15" nowrap="nowrap">&nbsp;</td>
        <td height="36" colspan="3" id="navigation" nowrap="nowrap" class="navText"><a href="javascript:;">HOME</a></td>
        <td>&nbsp;</td>
        </tr>
        
        <tr bgcolor="#ffffff">
        <td width="15" valign="top"><img src="mm_spacer.gif" alt="" width="15" height="1" border="0" /></td>
        <td width="140" valign="top"><img src="mm_spacer.gif" alt="" width="140" height="1" border="0" /></td>
        <td width="505" valign="top"><br />
        <table border="0" cellspacing="0" cellpadding="2" width="600">
        	<tr>
        	<td width="536" class="pageName">Application</td>
        	</tr>
        
        	<tr>
        	<td class="bodyText">
        	<p><form name="form" action="http://www.derosarentals.com/verification.php" method="post">

        <table width="100%" border="0" cellpadding="0" align="right">
        <tr>
        <td width="60%"><b>Applicant 1</b></td>
        <td width="40%"><b>Applicant 2</b></td>
        </tr>
        <tr>
        <td width="60%" height="30"><font size="-1">Name:</font>
        <input name="first1" size="10" >&nbsp;<input name="last1" size="20" ></td>
        <td width="40%" height="30">
        <input name="first2" size="10" >&nbsp;<input name="last2" size="20" ></td>
        </tr>
        <tr>
        <td width="60%" height="28"><font size="-1">Address:</font>
        <input name="address1" size="20" ></td>
        <td width="40%">
        <input name="address2" size="20" ></td>
        </tr>
        <tr>
        <td width="60%" height="27"><font size="-1">City, State:</font>
        <input name="city1" size="15">&nbsp;<input name="state1" size="3"></td>
        <td width="40%">
        <input name="city2" size="15">&nbsp;<input name="state2" size="3"></td>
        </tr>
        <tr>
        <td width="60%"><font size="-1">Zip:</font>
        <input name="zip1" size="7"></td>
        <td width="40%">
        <input name="zip2" size="7"></td>
        </tr>
        <tr>
        <td width="60%" height="29"><font size="-1">DOB:</font>
        <input name="dob1" size="15"></td>
        <td width="40%">
        <input name="dob2" size="15"></td>
        </tr>
        <tr>
        <td width="60%"><font size="-1">SSN #:</font>
        <input name="ssn1" size="13"></td>
        <td width="40%">
        <input name="ssn2" size="13"></td>
        </tr>
        <tr>
        <td width="60%" height="29"><font size="-1">Driver License:</font>
        <input name="driver1" size="20"></td>
        <td width="40%">
        <input name="driver2" size="20"></td>
        </tr>
        <tr>
        <td width="60%" height="28"><font size="-1">Phone (day):</font>
        <input name="dayPhone1" size="15"></td>
        <td width="40%">
        <input name="dayPhone2" size="15"></td>
        </tr>
        <tr>
        <td width="60%" height="27"><font size="-1">Home Phone:</font>
        <input name="homePhone1" size="15"></td>
        <td width="40%">
        <input name="homePhone2" size="15"></td>
        </tr>
        <tr>
        <td width="60%" height="30"><font size="-1">Occupation:</font>
        <input name="occupation1" size="20"></td>
        <td width="40%">
        <input name="occupation2" size="20"></td>
        </tr>
        <tr>
        <td width="60%" height="28"><font size="-1">Employer:</font>
        <input name="employer1" size="20"></td>
        <td width="40%">
        <input name="employer2" size="20"></td>
        </tr>
        <tr>
        <td width="60%" height="27"><font size="-1">Employer's Address:</font>
        <input name="empAddress1" size="20"></td>
        <td width="40%">
        <input name="empAddress2" size="20"></td>
        </tr>
        <tr>
        <td width="60%" height="27"><font size="-1">City, State, Zip:</font>
        <input name="city_1" size="15">
        <input name="state_1" size="3">&nbsp;<input name="zip_1" size="4"></td>
        <td width="40%">
        <input name="city_2" size="15">
        <input name="state_2" size="3">&nbsp;<input name="zip_2" size="4"></td>
        </tr>
        <tr>
        <td width="60%"><font size="-1">Salary: $</font>
        <input name="salary1" size="10"></td>
        <td width="40%">
        $
        <input name="salary2" size="10"></td>
        </tr>
        <tr>
        <td width="60%" height="28"><font size="-1">Length of Employment:</font>
        <input name="length1" size="3"></td>
        <td width="40%">
        <input name="length2" size="3"></td>
        </tr>
        <tr>
        <td width="60%" height="28"><font size="-1">Bank:</font>
        <input name="bank1" size="20"></td>
        <td width="40%">
        <input name="bank2" size="20"></td>
        </tr>
        <tr>
        <td width="60%" height="28"><font size="-1">Bank's Address:</font>
        <input name="bankAddress1" size="20"></td>
        <td width="40%">
        <input name="bankAddress2" size="20"></td>
        </tr>
        <tr>
        <td width="60%" height="28"><font size="-1">Checking Account #:</font>
        <input name="checking1" size="20"></td>
        <td width="40%">
        <input name="checking2" size="20"></td>
        </tr>
        <tr>
        <td width="60%" height="27"><font size="-1">Current rent/mortgage: $</font>
        <input name="rent1" size="10"></td>
        <td width="40%">
        $
        <input name="rent2" size="10"></td>
        </tr>
        <tr>
        <td width="60%" height="27"><font size="-1">Current Landlord:</font>
        <input name="landlord1" size="20"></td>
        <td width="40%">
        <input name="landlord2" size="20"></td>
        </tr>
        <tr>
        <td width="60%" height="26"><font size="-1">Current Landlord's Phone:</font>
        <input name="landlordPhone1" size="15"></td>
        <td width="40%">
        <input name="landlordPhone2" size="15"></td>
        </tr>
        <tr>
        <td width="60%"><font size="-1">Additional Occupant(s):</font>
        <input name="occupats1" size="20"></td>
        <td width="40%"><input name="occupats2" size="20"></td>
        </tr>
        <tr>

        <td><font size="-1">
        <b>Please check information for any mistakes.</b></font></td>
        <td><font size="-1">
        <input type=submit value="Submit"> &nbsp; <input type=reset value="Clear"></font></td>
        </tr>
        </table>
        </form></p>

        	<br/></td>
        	</tr>
        </table>
         <br />
        &nbsp;<br />	</td>
        <td valign="top">&nbsp;</td>
        <td width="100%">&nbsp;</td>
        </tr>
        
        <tr>
        <td width="15">&nbsp;</td>
        <td width="140">&nbsp;</td>
        <td width="505">&nbsp;</td>
        <td width="100">&nbsp;</td>
        <td width="100%">&nbsp;</td>

        </tr>
        </table>
        </body>
        </html>

          I have run your code through an editor, although I did make some minor changes, and all it does is redisplay what I suppose is the original form. Am I correct making that statement? Probably the form itself is what needs to be looked at, and plaease when posting your code if you will look in the top of the posting body just below the font controls for colo there is a # (for code) and <> for HTML and a tilde ~ inside a dogeared page, those enable you to enter code like this.

          <?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>"
           ."<p class=bodymd>Sorry but you must fill in all fields.</p>"
           ."<p class=bodymd>Fill in the ones you missed, they are listed below.</p>";
          }

          Instead of this
          <?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>"
          ."<p class=bodymd>Sorry but you must fill in all fields.</p>"
          ."<p class=bodymd>Fill in the ones you missed, they are listed below.</p>";
          }

            OK that's only html code and nowhere in ther does it add fields by filling in one set

              OK. Let me try to clarify what I need to do. An applicant goes the the Webiste to fill in the online form. When he/she hits submit, it goes to another page where all the information they entered has been entered to a printable application which they can print out, sign, and mail in.

              Now, on the validation.php file, should I be adding in the html fields to where the information will be inputed to? This will go to the bottom of the actual php code correct?

              Am I headed in the right direction?

                Name the below tenentform.php and try it out. It will check over all the fields that you specified with your first script, and then print the misssing fields in white at the very top of your page in the Blue header you have so they can bee seen. Basically this form submits to itself, with field already entered left as is and those not filled out producing error text (in white at the top) until all required fields are filled out.

                <html>
                <head>
                <title>Application</title>
                <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
                <link rel="stylesheet" href="mm_derosa.css" type="text/css" />
                </head>
                <body bgcolor="#0066cc">
                <?php
                //only validate when form is submitted scriptname = tenentform.php
                if(isset($_POST[submit])){
                	$error_msg='';
                
                if(trim($_POST['first1'])==""){
                  $error_msg.="Please enter your First name!<br />";
                }
                if(trim($_POST['last1'])==""){
                  $error_msg.="Please enter your Last name!<br />";
                }
                if(trim($_POST['address1'])==""){
                  $error_msg.="You did not put an address!<br />";
                }
                if(trim($_POST['city1'])==""){
                  $error_msg.="The city was omitted.<br />";
                }
                if(trim($_POST['state1'])==""){
                  $error_msg.="The state was omitted.<br />";
                }
                if(trim($_POST['zip1'])==""){
                  $error_msg.="You must supply the zip code.<br />";
                }
                if(trim($_POST['salary1'])==""){
                  $error_msg.="Salary or wages are required!<br />";
                }
                if(trim($_POST['length1'])==""){
                  $error_msg.="Length of employment is required!<br />";
                }
                if(trim($_POST['bank1'])==""){
                  $error_msg.="Your banking institution was left out!!<br />";
                }
                if(trim($_POST['bankAddress1'])==""){
                  $error_msg.="You need to provide the banks address!<br />";
                }
                if(trim($_POST['landlord1'])==""){
                  $error_msg.="Please enter your currnt landlords name!<br />";
                }
                if(trim($_POST['landlordPhone1'])==""){
                  $error_msg.="Please enter your landlords phone number!<br />";
                }
                if($error_msg==""){
                  //do something here the form has been verified, go to another page or 
                  //something along those lines.
                  echo"Thank you for filling out the Form.";
                }
                else{
                  echo"<font color=white>$error_msg</font>";
                }
                }	
                
                ?>	
                

                The code is over two posts since it is limited to 10,000 chars the next part will have the actual form.

                  Just add the below in the same file, notice that this form echos the values that have been previously posted thereby keeping them intact.

                  <table width="100%" border="0" cellspacing="0" cellpadding="0">
                  <tr bgcolor="#99ccff">
                  <td width="15" nowrap="nowrap">&nbsp;</td>
                  <td width="745" height="60" colspan="3" class="logo" nowrap="nowrap"><br />
                  Application <span class="tagline">| DeRosa Rentals </span></td>
                  <td width="100%">&nbsp;</td>
                  </tr>
                  <tr bgcolor="#003399">
                  <td width="15" nowrap="nowrap">&nbsp;</td>
                  <td height="36" colspan="3" id="navigation" nowrap="nowrap" class="navText"><a href="javascript:;">HOME</a></td>
                  <td>&nbsp;</td>
                  </tr>
                  <tr bgcolor="#ffffff">
                  <td width="15" valign="top"><img src="mm_spacer.gif" alt="" width="15" height="1" border="0" /></td>
                  <td width="140" valign="top"><img src="mm_spacer.gif" alt="" width="140" height="1" border="0" /></td>
                  <td width="505" valign="top"><br />
                  <table border="0" cellspacing="0" cellpadding="2" width="600">
                  <tr>
                  <td width="536" class="pageName">Application</td>
                  </tr>
                  <tr>
                  <td class="bodyText">
                  <p><form name="form" action="tenentform.php" method="post">
                  <table width="100%" border="0" cellpadding="0" align="right">
                  <tr>
                  <td width="60%"><b>Applicant 1</b></td>
                  <td width="40%"><b>Applicant 2</b></td>
                  </tr>
                  <tr>
                  <td width="60%" height="30"><font size="-1">Name:</font>
                  <input name="first1" size="10" value="<?php echo $_POST['first1'];?>" >&nbsp;<input name="last1" size="20" value="<?php echo $_POST['last1'];?>"></td>
                  <td width="40%" height="30">
                  <input name="first2" size="10" value="<?php echo $_POST['first2'];?>">&nbsp;<input name="last2" size="20" value="<?php echo $_POST['last2'];?>"></td>
                  </tr>
                  <tr>
                  <td width="60%" height="28"><font size="-1">Address:</font>
                  <input name="address1" size="20" value="<?php echo $_POST['address1'];?>"></td>
                  <td width="40%">
                  <input name="address2" size="20" value="<?php echo $_POST['address2'];?>" ></td>
                  </tr>
                  <tr>
                  <td width="60%" height="27"><font size="-1">City, State:</font>
                  <input name="city1" size="15"value="<?php echo $_POST['city1'];?>">&nbsp;<input name="state1" size="3"value="<?php echo $_POST['address2'];?>"></td>
                  <td width="40%">
                  <input name="city2" size="15" value="<?php echo $_POST['city2'];?>">&nbsp;<input name="state2" size="3"value="<?php echo $_POST['state2'];?>"></td>
                  </tr>
                  <tr>
                  <td width="60%"><font size="-1">Zip:</font>
                  <input name="zip1" size="7" value="<?php echo $_POST['zip1'];?>"></td>
                  <td width="40%">
                  <input name="zip2" size="7" value="<?php echo $_POST['zip2'];?>"></td>
                  </tr>
                  <tr>
                  <td width="60%" height="29"><font size="-1">DOB:</font>
                  <input name="dob1" size="15" value="<?php echo $_POST['dob1'];?>"></td>
                  <td width="40%">
                  <input name="dob2" size="15" value="<?php echo $_POST['dob2'];?>"></td>
                  </tr>
                  <tr>
                  <td width="60%"><font size="-1">SSN #:</font>
                  <input name="ssn1" size="13" value="<?php echo $_POST['ssn1'];?>"></td>
                  <td width="40%">
                  <input name="ssn2" size="13" value="<?php echo $_POST['ssn2'];?>"></td>
                  </tr>
                  <tr>
                  <td width="60%" height="29"><font size="-1">Driver License:</font>
                  <input name="driver1" size="20" value="<?php echo $_POST['driver1'];?>"></td>
                  <td width="40%">
                  <input name="driver2" size="20" value="<?php echo $_POST['driver1'];?>"></td>
                  </tr>
                  <tr>
                  <td width="60%" height="28"><font size="-1">Phone (day):</font>
                  <input name="dayPhone1" size="15" value="<?php echo $_POST['dayPhone1'];?>"></td>
                  <td width="40%">
                  <input name="dayPhone2" size="15" value="<?php echo $_POST['dayPhone2'];?>"></td>
                  </tr>
                  <tr>
                  <td width="60%" height="27"><font size="-1">Home Phone:</font>
                  <input name="homePhone1" size="15" value="<?php echo $_POST['homePhone1'];?>"></td>
                  <td width="40%">
                  <input name="homePhone2" size="15" value="<?php echo $_POST['homePhone2'];?>"></td>
                  </tr>
                  <tr>
                  <td width="60%" height="30"><font size="-1">Occupation:</font>
                  <input name="occupation1" size="20" value="<?php echo $_POST['occupation1'];?>"></td>
                  <td width="40%">
                  <input name="occupation2" size="20" value="<?php echo $_POST['occupation2'];?>"></td>
                  </tr>
                  <tr>
                  <td width="60%" height="28"><font size="-1">Employer:</font>
                  <input name="employer1" size="20" value="<?php echo $_POST['employer1'];?>"></td>
                  <td width="40%">
                  <input name="employer2" size="20" value="<?php echo $_POST['employer2'];?>"></td>
                  </tr>
                  <tr>
                  <td width="60%" height="27"><font size="-1">Employer's Address:</font>
                  <input name="empAddress1" size="20" value="<?php echo $_POST['empAddress1'];?>"></td>
                  <td width="40%">
                  <input name="empAddress2" size="20" value="<?php echo $_POST['empAddress2'];?>"></td>
                  </tr>
                  <tr>
                  <td width="60%" height="27"><font size="-1">City, State, Zip:</font>
                  <input name="city_1" size="15" value="<?php echo $_POST['city_1'];?>">
                  <input name="state_1" size="3" value="<?php echo $_POST['state_1'];?>">&nbsp;<input name="zip_1" size="4"value="<?php echo $_POST['zip_1'];?>"></td>
                  <td width="40%">
                  <input name="city_2" size="15" value="<?php echo $_POST['city_2'];?>">
                  <input name="state_2" size="3" value="<?php echo $_POST['state_2'];?>">&nbsp;<input name="zip_2" size="4"value="<?php echo $_POST['zip_2'];?>"></td>
                  </tr>
                  <tr>
                  <td width="60%"><font size="-1">Salary: $</font>
                  <input name="salary1" size="10"value="<?php echo $_POST['salary1'];?>"></td>
                  <td width="40%">
                  $
                  <input name="salary2" size="10"value="<?php echo $_POST['salary2'];?>"></td>
                  </tr>
                  <tr>
                  <td width="60%" height="28"><font size="-1">Length of Employment:</font>
                  <input name="length1" size="3" value="<?php echo $_POST['length1'];?>"></td>
                  <td width="40%">
                  <input name="length2" size="3" value="<?php echo $_POST['length2'];?>"></td>
                  </tr>
                  <tr>
                  <td width="60%" height="28" ><font size="-1">Bank:</font>
                  <input name="bank1" size="20" value="<?php echo $_POST['bank1'];?>"></td>
                  <td width="40%">
                  <input name="bank2" size="20" value="<?php echo $_POST['bank2'];?>"></td>
                  </tr>
                  <tr>
                  <td width="60%" height="28"><font size="-1">Bank's Address:</font>
                  <input name="bankAddress1" size="20" value="<?php echo $_POST['bank2'];?>"></td>
                  <td width="40%">
                  <input name="bankAddress2" size="20" value="<?php echo $_POST['bank2'];?>"></td>
                  </tr>
                  <tr>
                  <td width="60%" height="28"><font size="-1">Checking Account #:</font>
                  <input name="checking1" size="20" value="<?php echo $_POST['checking1'];?>"></td>
                  <td width="40%">
                  <input name="checking2" size="20" value="<?php echo $_POST['checking2'];?>"></td>
                  </tr>
                  <tr>
                  <td width="60%" height="27"><font size="-1">Current rent/mortgage: $</font>
                  <input name="rent1" size="10" value="<?php echo $_POST['rent1'];?>"></td>
                  <td width="40%">
                  $
                  <input name="rent2" size="10" value="<?php echo $_POST['rent2'];?>"></td>
                  </tr>
                  <tr>
                  <td width="60%" height="27"><font size="-1">Current Landlord:</font>
                  <input name="landlord1" size="20" value="<?php echo $_POST['landlord1'];?>"></td>
                  <td width="40%">
                  <input name="landlord2" size="20" value="<?php echo $_POST['landlord2'];?>"></td>
                  </tr>
                  <tr>
                  <td width="60%" height="26"><font size="-1">Current Landlord's Phone:</font>
                  <input name="landlordPhone1" size="15" value="<?php echo $_POST['landlordPhone1'];?>"></td>
                  <td width="40%">
                  <input name="landlordPhone2" size="15" value="<?php echo $_POST['landlordPhone2'];?>"></td>
                  </tr>
                  <tr>
                  <td width="60%"><font size="-1">Additional Occupant(s):</font>
                  <input name="occupats1" size="20" value="<?php echo $_POST['occupats1'];?>"></td>
                  <td width="40%"><input name="occupats2" size="20" value="<?php echo $_POST['occupats2'];?>"></td>
                  </tr>
                  <tr>
                  <td><font size="-1">
                  <b>Please check information for any mistakes.</b></font></td>
                  <td><font size="-1">
                  <input type=submit value="Submit" name="submit"> &nbsp; <input type=reset value="Clear"></font></td>
                  </tr>
                  </table>
                  </form></p>
                  
                  <br/></td>
                  </tr>
                  </table>
                  <br />
                  &nbsp;<br /> </td>
                  <td valign="top">&nbsp;</td>
                  <td width="100%">&nbsp;</td>
                  </tr>
                  
                  <tr>
                  <td width="15">&nbsp;</td>
                  <td width="140">&nbsp;</td>
                  <td width="505">&nbsp;</td>
                  <td width="100">&nbsp;</td>
                  <td width="100%">&nbsp;</td>
                  </tr>
                  </table>
                  </body>
                  </html>

                  [/code]

                    Thanks for helping me out. I'll give it a try later on tonight or tomorrow. You didn't have to go all out and do it for me..., but thanks. I just wanted some guidence so that I could figure it out. Don't get me wrong, I really appreciate it. I originally wanted to keep it at perl, however its stating that I have some server error. I checked my codes and emailed the company that hosts the site. He states something is in the code, which I know is not because its the same code that was on the old site. Accidentally I removed it, then put it right back on. I set the parameters to 755 and now it doesn't work...

                    Again, thanks for your help! I'll let you know how it turns out!

                      Well with the exception of adding the error code at the very top of the script which is about 56 lines of pretty simple code and then using search and replace to add the value in the form so it would echo values already added by the user it wasn't really that much. You might want to add checking for telephone numbers and zip code with a regex to make it even better, so all I checked for was blank values not necessarily valid or sensical ones. The code does work casue I did test it prior to posting. I am sure there is more you can do with what I posted that is just to give you a little help.

                        I really do appreciate your help. I will do a zipcode verification and phone number verification. Last but not least, I have to add a check box for the people to check before submitting because with this application a credit check will be done and they have to OK that. Or, I may just add a field where they have to type in the word "Agree."

                        Thanks.

                        One thing I forgot to add, say I want all the information that was typed in to be transferred to another page where the inputted information is displayed on the screen in an application, could I just change the;

                        <p><form name="form" action="http://www.derosarentals.com/2006/tenentform.php" method="post">

                        TO

                        <p><form name="form" action="http://www.derosarentals.com/2006/tenentform_2.php" method="post">

                        which would ultimately show the actual application with all the fields filled in? The "tenentform_2.php" would look similar in code to the "tenentform.php." I just have to include the application in html format, just include all the php values and save as a .php file.

                        Is this correct?

                          Well yes and no and by that I mean the script you have now submits to itself (with a relative address, your code uses an absolutle address), but when the form is submitted correctly then you just change this line

                           // display error message if any, if not, proceed to other processing
                          	if($error_msg==''){
                          	echo "<script type=\"text/javascript\">window.location=\"yournew.php\"</script>";
                          // Or use  echo "<a href=\"...\">somepagelinkhere</a>":
                          	} else {
                          		echo "<font color=white>$error_msg</font>";
                          	}
                          }
                          ?>

                          If you attempt to use a header you will encounter an error because you already have output

                            Hmm after looking at you post again I noticed that you want to represent the form so right now I am tired but let me think about it, but yes you could do something different, first let's just get it validated and verifed that the fields you want are filled in then go to the other things.

                            Sorry all information from that script will be available in the $POST array so you would address them by that such as $first1= $POST['first1'] etcetera unless I am so tired it does not make sense.

                              The code that you supplied did work. I just added a few other fields to it. So it does validate as it should. When I used the perl it worked flawlessly. It appears that the setup will be somewhat similar with the $first1 = $_POST['first1'].
                              I used; $first1= formdata('first1');-- something like that. Haven't used perl in 3 years and I am just getting back to it. However I prefer php. PHP is fairly new to me.

                              My brain was tired from crunching out too much information over the weekend.

                              Thanks

                                At least you see the logic to that approach by having the page to submit to itself while retaining already posted information, and it is adaptable to just about any situation with the exception of checkboxes To repopulate checkboxes(there were 348 of them in a health form) it took a 4 pages and a datbase with boolean true false and a bunch of ternary statements. I was quite tired last night and am glad you got it going.

                                That is a brutal tenency application, I would probably be real mad if I were to fill it out and then be presented with the same blank form had I missed something, and likely would have just gone somewhere else to lok for a place to live.

                                  You are right, the application is a pain in the you know what!!! I think I may skip out on the check box. However I will add a field where it states that the tenent will have to type the word "agree" in order to process the form. Now, can I set it up so that the word must be "agree" and not another word? There will actually have to be three types of applications. One for filling out online and printing, one to submit through email, and the other for the second tenent.

                                  What book do you recommend I pick up that would be helpful to me as far as forms go? Not that you have not been a HUGE help. I would like something for those late nights!

                                  As you said, I would too be really mad if I filled out the form and forgot to put in the state, hit submit, and had to completely do the application all over again.

                                    Maybe something like eregi("Agree",$var); see eregi() Can match AGREE AGree Agree aGREE agREE and so on, it is non case sensitive.

                                      Houdini wrote:

                                      Maybe something like eregi("Agree",$var); see eregi() Can match AGREE AGree Agree aGREE agREE and so on, it is non case sensitive.

                                      That's awesome...I will have to try that...Once I get the application all set I will let you know how it worked out...

                                      By the way, what good PHP book do you recommend.