Site I designed is here
The properties page has a form that allows for searching on the properties. For some reason, it seems to crash sometimes. Then I refresh the apge, and it works fine. Can not figure it out
Here is the code for the form
<form name="proform" action="properties.php" method="post">
<table border="0" align="center" cellpadding="2" cellspacing="2">
<tr>
<td align="left">
<select name="s_type" class="width">
<option value="-1" selected>Choose Property Type </option>
<?php
$pro1 = new propertytype();
$pro_urb = $pro1->getPropertyType();
while($r1 = mysql_fetch_object($pro_urb))
{
?>
<option <?php if($_POST['s_type']==($r1->id)){ echo " selected " ;}?> value=<?php echo($r1->id);?>> <?php echo($r1->types);?> </option>
<?php
}
?>
</select>
</td>
</tr>
<tr>
<td align="left">
<select name="s_suburb" class="width">
<option value="-1" selected>Choose Area </option>
<?php
$sub = new suburb();
$sub_urb = $sub->getSuburb();
while($r1 = mysql_fetch_object($sub_urb))
{
?>
<option <?php if($_POST['s_suburb']==($r1->id)){echo " selected " ;}?> value=<?php echo($r1->id);?>> <?php echo($r1->sub);?> </option>
<?php
}
?>
</select>
</td>
</tr>
<tr>
<td align="left">
<select name=s_pricerange1 class="width">
<option value="-1" selected>Price Levels </option>
<option <?php if($_POST['s_pricerange1']==1) {echo " selected " ;}?>value="1">Under
$250,000 </option>
<option <?php if($_POST['s_pricerange1']==2){ echo " selected " ;}?>value="2">$250,000-$500,000 </option>
<option <?php if($_POST['s_pricerange1']==3){ echo " selected " ;}?>value="3">$500,000-$750,000 </option>
<option <?php if($_POST['s_pricerange1']==4){ echo " selected " ;}?>value="4">$750,000-$1,000,000 </option>
<option <?php if($_POST['s_pricerange1']==5){ echo " selected " ;}?>value="5">$1,000,000
+ </option>
</select>
</td>
</tr>
<tr>
<td align="left">
<select name=s_status class="width">
<option value="-1" selected>Choose status </option>
<option <?php if($_POST['s_status']==1) {echo " selected " ;}?>value="1">For
Sale </option>
<option <?php if($_POST['s_status']==2) {echo " selected " ;}?>value="2">For
Sale - Auction </option>
<option <?php if($_POST['s_status']==3) {echo " selected " ;}?>value="3">Under
Contract </option>
<option <?php if($_POST['s_status']==4) {echo " selected " ;}?>value="4">Sold </option>
</select>
</td>
</tr>
<tr>
<td align="left">
<select name="s_order" class="width">
<option value="0" selected>Display Order </option>
<option <?php if($_POST['s_order']==1) {echo " selected " ;}?>value="1">By
Suburb </option>
<option <?php if($_POST['s_order']==2) {echo " selected " ;}?>value="2">By
Most recent Listing </option>
<option <?php if($_POST['s_order']==3) {echo " selected " ;}?>value="3">By
Price (Lowest First) </option>
<option<?php if($_POST['s_order']==4) {echo " selected " ;}?> value="4">By
Price (Highest First) </option>
</select>
</td>
</tr>
<tr>
<td width="150" align="left"><div align="center">
<input type="hidden" name="Submit2">
<input type="button" value="Submit" onclick="send()">
</div>
</td>
</tr>
</table>
</form>
I can supply code for whole apge if necessary.
Can anyone spot whatis wrong?
The properties page has a form that allows for searching on the properties. For some reason, it seems to crash sometimes. Then I refresh the apge, and it works fine. Can not figure it out
Here is the code for the form
<form name="proform" action="properties.php" method="post">
<table border="0" align="center" cellpadding="2" cellspacing="2">
<tr>
<td align="left">
<select name="s_type" class="width">
<option value="-1" selected>Choose Property Type </option>
<?php
$pro1 = new propertytype();
$pro_urb = $pro1->getPropertyType();
while($r1 = mysql_fetch_object($pro_urb))
{
?>
<option <?php if($_POST['s_type']==($r1->id)){ echo " selected " ;}?> value=<?php echo($r1->id);?>> <?php echo($r1->types);?> </option>
<?php
}
?>
</select>
</td>
</tr>
<tr>
<td align="left">
<select name="s_suburb" class="width">
<option value="-1" selected>Choose Area </option>
<?php
$sub = new suburb();
$sub_urb = $sub->getSuburb();
while($r1 = mysql_fetch_object($sub_urb))
{
?>
<option <?php if($_POST['s_suburb']==($r1->id)){echo " selected " ;}?> value=<?php echo($r1->id);?>> <?php echo($r1->sub);?> </option>
<?php
}
?>
</select>
</td>
</tr>
<tr>
<td align="left">
<select name=s_pricerange1 class="width">
<option value="-1" selected>Price Levels </option>
<option <?php if($_POST['s_pricerange1']==1) {echo " selected " ;}?>value="1">Under
$250,000 </option>
<option <?php if($_POST['s_pricerange1']==2){ echo " selected " ;}?>value="2">$250,000-$500,000 </option>
<option <?php if($_POST['s_pricerange1']==3){ echo " selected " ;}?>value="3">$500,000-$750,000 </option>
<option <?php if($_POST['s_pricerange1']==4){ echo " selected " ;}?>value="4">$750,000-$1,000,000 </option>
<option <?php if($_POST['s_pricerange1']==5){ echo " selected " ;}?>value="5">$1,000,000
+ </option>
</select>
</td>
</tr>
<tr>
<td align="left">
<select name=s_status class="width">
<option value="-1" selected>Choose status </option>
<option <?php if($_POST['s_status']==1) {echo " selected " ;}?>value="1">For
Sale </option>
<option <?php if($_POST['s_status']==2) {echo " selected " ;}?>value="2">For
Sale - Auction </option>
<option <?php if($_POST['s_status']==3) {echo " selected " ;}?>value="3">Under
Contract </option>
<option <?php if($_POST['s_status']==4) {echo " selected " ;}?>value="4">Sold </option>
</select>
</td>
</tr>
<tr>
<td align="left">
<select name="s_order" class="width">
<option value="0" selected>Display Order </option>
<option <?php if($_POST['s_order']==1) {echo " selected " ;}?>value="1">By
Suburb </option>
<option <?php if($_POST['s_order']==2) {echo " selected " ;}?>value="2">By
Most recent Listing </option>
<option <?php if($_POST['s_order']==3) {echo " selected " ;}?>value="3">By
Price (Lowest First) </option>
<option<?php if($_POST['s_order']==4) {echo " selected " ;}?> value="4">By
Price (Highest First) </option>
</select>
</td>
</tr>
<tr>
<td width="150" align="left"><div align="center">
<input type="hidden" name="Submit2">
<input type="button" value="Submit" onclick="send()">
</div>
</td>
</tr>
</table>
</form>
I can supply code for whole apge if necessary.
Can anyone spot whatis wrong?