Hi,

I have an situation on my hands I have a form that I am stuck using PHP for
thanks to my friends choice of hosting company, I have no idea on how to
setup a form in PHP other than HTML or in Flash, I need some one any one
to give me some advice on this Posted layout it seems to work but not
really,
I managed to get it set up but for some reason when you hit Submit and an
error message goes off at the top the form is Reset. Other than that I am
not
sure I wrote all the code correctly.

Sorry About the long post....

Any advice would be great.

www.mdycentrutionmtg.com/formtest.php

------------------------Formtest.php------------------------------


<?PHP

if ($submit) {

if ($firstname <= "")
    $message = "Please enter your first name.";
else
if ($lastname <= "")
    $message = "Please enter your last name.";
else
if ($homephone <= "")
    $message = "Please enter your home phone number.";
else
if ($address <= "")
    $message = "Please enter your current home address.";
else
if ($city <= "")
    $message = "Please enter which city you currently live in.";
else
if ($state <= "")
    $message = "Please enter which state you currently live in.";
else
if ($zip <= "")
    $message = "Please enter your zip code.";
else
if ($monthlypayment <= "")
    $message = "Please enter the amount of your monthly payment.";
else
if ($presentemployer <= "")
    $message = "Please enter the name of your present employer.";
else
if ($rateofpay <= "")
    $message = "Please enter your rate of pay.";
else
if ($hoursperweek <= "")
    $message = "Please enter the average amount of hours worked in a week.";
else
if ($deposit <= "")
    $message = "Please enter the amount of your deposit.";
else
if ($maxpayment <= "")
    $message = "Please enter an average payment your comfortable with.";

if ($message)
   echo ($yo);

else {
   mail("[EMAIL PROTECTED]",
   "Form Results",
   "First Name $firstname",
   "Middle Initial $middleinital",
   "Last Name $lastname",
   "Social Security Number $ss",
   "Marital Status $maritalstatus",
   "Home Phone $homephone",
   "Address $address",
   "City $city",
   "State $state",
   "Zip $zip",
   "Apt Number $apt",
   "Time at address $monthsataddress Months $yearsataddress Years",
   "Type of residence $typeofres",
   "Monthly Payment $monthlypayment",
   "Current Employer $presentemployer",
   "Time with Employer $monthswithemployer Months $yearswithemployer Years",
   "Rate of Pay $rateofpay Dollars per $rateofpayper",
   "Hours per week $hoursperweek",
   "Work Phone $workphone",
   "Work History $workhistory",
   "Other Income $otherincome",
   "Deposit $deposit",
   "Maximum Payment $maxpayment",
   "Type of Loan $typeofloan",
   "Co First Name $cofirstname",
   "Co Middle Initial $comiddleinital",
   "Co Last Name $colastname",
   "Co Social Security Number $coss",
   "Co Marital Status $comaritalstatus",
   "Co Home Phone $cohomephone",
   "Co Address $coaddress",
   "Co City $cocity",
   "Co State $costate",
   "Co Zip $cozip",
   "Co Apt Number $coapt",
   "Co Time at address $comonthsataddress Months $coyearsataddress Years",
   "Co Type of residence $cotypeofres",
   "Co Monthly Payment $comonthlypayment",
   "Co Current Employer $copresentemployer",
   "Co Time with Employer $comonthswithemployer Months $coyearswithemployer
Years",
   "Co Rate of Pay $corateofpay Dollars per $corateofpayper",
   "Co Hours per week $cohoursperweek",
   "Co Work Phone $coworkphone",
   "From: $firstname $lastname",
   "Subject: Online Form Application");

   $message = "Thank You.";
}
}
?>

<html>
 <head>
  <title>Centurion Loan Form</title>
 </head>
 <body bgcolor="#71c4ca">

<form method="post">
<p>
           <div align="center">
    <table border="0" cellpadding="0" cellspacing="0" width="660">
     <tr>
      <td colspan="2">
       <div align="center">
        <b>Loan Form</b>
        <address><font size="-2">Please fill in all the fields below to the
best of your knowledge if you have any questions </font><font
size="-2">please feel free to call me at 248-770-7518<br>
         </font></address>
       </div>
       <address>
        <div align="center">
         <font size="2"><?php  echo $message;  ?></font></div>
        <p>
         </p>
       </address>
      </td>
     </tr>
     <tr>
      <td>
       <p>Borrower</p>
      </td>
      <td>Co-Borrower</td>
     </tr>
     <tr>
      <td>
      </td>
      <td></td>
     </tr>
     <tr>
      <td>First Name</td>
      <td>First Name</td>
     </tr>
     <tr>
      <td><input type="text" name="firstname" size="25" maxlength="30"
tabindex="1"> MI <input type="text" name="middleinitial" size="2"
maxlength="2" tabindex="2"></td>
      <td><input type="text" name="cofirstname" size="25" maxlength="30"
tabindex="23"> MI <input type="text" name="comiddleinitial" size="2"
maxlength="2" tabindex="24"></td>
     </tr>
     <tr>
      <td>Last Name</td>
      <td>Last Name</td>
     </tr>
     <tr>
      <td><input type="text" name="lastname" size="25" maxlength="30"
tabindex="3"></td>
      <td><input type="text" name="colastname" size="25" maxlength="30"
tabindex="25"></td>
     </tr>
     <tr>
      <td>
       <p>S.S. #</p>
      </td>
      <td>
       <p>S.S. #</p>
      </td>
     </tr>
     <tr>
      <td>
       <p><input type="text" name="ss" size="25" maxlength="11"
tabindex="4"></p>
      </td>
      <td>
       <p><input type="text" name="coss" size="25" maxlength="11"
tabindex="26"></p>
      </td>
     </tr>
     <tr>
      <td>Marital status</td>
      <td>Marital status</td>
     </tr>
     <tr>
      <td><select name="maritalstatus" size="1" tabindex="5">
        <option value="Single" selected>Single</option>
        <option value="Married">Married</option>
        <option value="Divorced">Divorced</option>
        <option value="In the process of devorce">In the process of
devorce</option>
       </select></td>
      <td><select name="comaritalstatus" size="1" tabindex="27">
        <option value="Single" selected>Single</option>
        <option value="Married">Married</option>
        <option value="Divorced">Divorced</option>
        <option value="In the process of devorce">In the process of
devorce</option>
       </select></td>
     </tr>
     <tr>
      <td>Home phone number</td>
      <td>Home phone number</td>
     </tr>
     <tr>
      <td><input type="text" name="homephone" size="25" maxlength="25"
value="" tabindex="6"></td>
      <td><input type="text" name="cohomephone" size="25" maxlength="25"
value="" tabindex="28"></td>
     </tr>
     <tr>
      <td>Present address</td>
      <td>Present address</td>
     </tr>
     <tr>
      <td><input type="text" name="address" size="32" maxlength="36"
value="" tabindex="7"></td>
      <td><input type="text" name="coaddress" size="32" maxlength="36"
value="" tabindex="29"></td>
     </tr>
     <tr>
      <td>City</td>
      <td>City</td>
     </tr>
     <tr>
      <td><input type="text" name="city" size="20" maxlength="20" value=""
tabindex="8"> State <input type="text" name="state" size="4" maxlength="2"
value="" tabindex="9"></td>
      <td><input type="text" name="cocity" size="20" maxlength="20" value=""
tabindex="30"> State <input type="text" name="costate" size="4"
maxlength="2" value="" tabindex="31"></td>
     </tr>
     <tr>
      <td>Zip code</td>
      <td>Zip code</td>
     </tr>
     <tr>
      <td><input type="text" name="zip" size="6" maxlength="12" value=""
tabindex="10"> Apt. # <input type="text" name="apt" size="5" maxlength="12"
value="" tabindex="11"></td>
      <td><input type="text" name="cozip" size="5" maxlength="12" value=""
tabindex="32"> Apt. # <input type="text" name="coapt" size="5"
maxlength="12" value="" tabindex="33"></td>
     </tr>
     <tr>
      <td>Time at this address</td>
      <td>Time at this address</td>
     </tr>
     <tr>
      <td><input type="text" name="monthsataddress" size="4" maxlength="2"
value="" tabindex="12"> Months <input type="text" name="yearsataddress"
size="4" maxlength="2" value="" tabindex="13"> Years</td>
      <td><input type="text" name="comonthsataddress" size="4" maxlength="2"
value="" tabindex="34"> Months <input type="text" name="coyearsataddress"
size="4" maxlength="2" value="" tabindex="35"> Years</td>
     </tr>
     <tr>
      <td>Type of residence</td>
      <td>Type of residence</td>
     </tr>
     <tr>
      <td><select name="typeofres" size="1" tabindex="14">
        <option value="Rent" selected>Rent</option>
        <option value="Own">Own</option>
       </select></td>
      <td><select name="cotypeofres" size="1" tabindex="36">
        <option value="Co-Rent" selected>Rent</option>
        <option value="Co-Own">Own</option>
       </select></td>
     </tr>
     <tr>
      <td>Amount of monthly payment</td>
      <td>Amount of monthly payment</td>
     </tr>
     <tr>
      <td>$<input type="text" name="monthlypayment" size="4" maxlength="4"
value="" tabindex="15"></td>
      <td>$<input type="text" name="comonthlypayment" size="4" maxlength="4"
value="" tabindex="37"></td>
     </tr>
     <tr>
      <td>Present employer</td>
      <td>Present employer</td>
     </tr>
     <tr>
      <td><input type="text" name="presentemployer" size="25" maxlength="25"
value="" tabindex="16"></td>
      <td><input type="text" name="copresentemployer" size="25"
maxlength="25" value="" tabindex="38"></td>
     </tr>
     <tr>
      <td>How long with this employer</td>
      <td>How long with this employer</td>
     </tr>
     <tr>
      <td><input type="text" name="monthswithemployer" size="4"
maxlength="2" value="" tabindex="17"> Months <input type="text"
name="yearswithemployer" size="4" maxlength="4" value="" tabindex="18">
Years</td>
      <td><input type="text" name="comonthswithemployer" size="4"
maxlength="2" value="" tabindex="39"> Months <input type="text"
name="coyearswithemployer" size="4" maxlength="4" value="" tabindex="40">
Years</td>
     </tr>
     <tr>
      <td>Rate of pay</td>
      <td>Rate of pay</td>
     </tr>
     <tr>
      <td>$<input type="text" name="rateofpay" size="3" maxlength="3"
value="" tabindex="19"> / <select name="rateofpayper" size="1"
tabindex="20">
        <option value="Hour" selected>Hour</option>
        <option value="Week">Week</option>
        <option value="Month">Month</option>
       </select></td>
      <td>$<input type="text" name="corateofpay" size="3" maxlength="3"
value="" tabindex="41"> / <select name="corateofpayper" size="1"
tabindex="42">
        <option value="Hour" selected>Hour</option>
        <option value="Week">Week</option>
        <option value="Month">Month</option>
       </select></td>
     </tr>
     <tr>
      <td>Average number of hours / week</td>
      <td>Number of hours / week</td>
     </tr>
     <tr>
      <td><input type="text" name="hoursperweek" size="3" maxlength="3"
value="" tabindex="21"></td>
      <td><input type="text" name="cohoursperweek" size="3" maxlength="3"
value="" tabindex="43"></td>
     </tr>
     <tr>
      <td>Work phone number</td>
      <td>Work phone number</td>
     </tr>
     <tr>
      <td><input type="text" name="workphone" size="25" maxlength="12"
value="" tabindex="22"></td>
      <td><input type="text" name="coworkphone" size="25" maxlength="12"
value="" tabindex="44"></td>
     </tr>
     <tr>
      <td colspan="2">Description of two year work history if less than two
years with present employer</td>
     </tr>
     <tr>
      <td colspan="2"><textarea name="workhistory" cols="63" rows="4"
tabindex="45"></textarea></td>
     </tr>
     <tr>
      <td colspan="2">Description of any other income recieved on a monthly
basis</td>
     </tr>
     <tr>
      <td colspan="2"><textarea name="otherincome" cols="63" rows="4"
tabindex="46"></textarea></td>
     </tr>
     <tr>
      <td colspan="2">
       <p>Amount of cash available to put down towards a new home</p>
      </td>
     </tr>
     <tr>
      <td colspan="2">$<input type="text" name="deposit" size="10"
maxlength="8" value="" tabindex="47"></td>
     </tr>
     <tr>
      <td colspan="2">Maximum payment you are comfortable with for a new
home</td>
     </tr>
     <tr>
      <td colspan="2">$<input type="text" name="maxpayment" size="10"
maxlength="8" value="" tabindex="48"> /Month</td>
     </tr>
     <tr>
      <td colspan="2">
       <div align="left">
        Please Pick the type of loan your applying for<br>
        <select name="typeofloan" size="1" tabindex="49">
         <option value="Mortgage loan" selected>Mortgage Loan</option>
         <option value="Refinancing">Refinancing</option>
        </select>
        <p><br>
        </p>
       </div>
      </td>
     </tr>
    </table>
    <input type="submit" name="submit" value="submit" tabindex="50"> <input
type="reset" value="RESET" tabindex="51"></div>
  </form>
  <p><font color="#71c4ca">Loan Application</font></p>
  <p></p>
 </body>

</html>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to