I'm trying to build a mortgage qualifying script for a company. My php code is working fine .. up until the if else statements. fyi I'm using wamp... heres the code. The code if very raw, i've only been working on it for a day or 2, but I can't understand why my if else statements aren't working.



<h1>Lead Capture</h1>
<div id = "leadcapture">
             <form method="post" action="process.php"> 
              Name:<br> <input name="name" type="text" STYLE="background: white; border: 1px #CACACA solid;"><br >

              Phone:<br><input name="phone" maxlength="13" size="13" type="text" STYLE="background: white; border: 1px #CACACA solid;"><br >

              Email: <br><input name="email" type="text" STYLE="background: white; border: 1px #CACACA solid;"><br >

              Market Value or Purchase Price of Property:<br ><input name="value" type="text" maxlength="9" size="10" STYLE="background: white; border: 1px #CACACA solid;"><br >

	<b><u>Loan Amount:</b></u><br>
	Purchase: Loan amount after down payment.<br>
	Refinance: Payoff.<br>
	Refinance (Cashout): Payoff + cash requesting.<br><input name="payoff" maxlength="9" size="10" type="text" STYLE="background: white; border: 1px #CACACA solid;"><br >

	Current Interest Rate(if applicable):<br ><input name="rate" type="text" maxlength="5" size="5" STYLE="background: white; border: 1px #CACACA solid;"><br >
	Estimated Credit Score: <br><select name="credit">
		<option value=">740">>740</option>
		<option value="739-720">739-720</option>
		<option value="719-700">719-700</option>
		<option value="699-680">699-680</option>
		<option value="679-660">679-660</option>
		<option value="659-640">659-640</option>
		<option value="639-600">639-600</option>
		<option value="<600"><600</option>
	Refinance or Buy:<br><select name="buysell">
		<option value="buy">Buy</option>
		<option value="refinance">Refinance</option>
		<option value="cashout">Refinance-Cashout</option>		

	<input type="submit" name="go" value="submit"> 




echo "Name:  $name<br>";
echo "Phone: $phone<br>";
echo "Email: $email<br>";
echo "Payoff: $payoff<br>";
echo "Market Value: $value<br>";
echo "Current Interest Rate:  $rate<br>";
echo "Estimated Credit Score: $credit<br>";
echo "You want to $buysell a property<br><br>";

echo"$number %<br>";

if($buysell=="Refinance - Cashout"){
	if($number >= 96.5){
		echo "Your Loan to Value Ratio is too high to Receive any cash out or to  refinance ";
	}elseif($number < 96.5 && $number > 80 ) { 
		echo "Your Loan to Value Ration is too high to receive any cash out but you are still able to refinance your property.";
		echo "Prior to any closing costs being subtracted your estimated cash back is $cashback.";
7 Years
Discussion Span
Last Post by Insensus
<option value="cashout">Refinance-Cashout</option>
$buysell=="Refinance - Cashout"

That doesn't match.
Should be


Edited by Insensus: n/a

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.