Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

search not working

Status
Not open for further replies.

boyfromoz

Technical User
Feb 1, 2001
469
AU
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=&quot;proform&quot; action=&quot;properties.php&quot; method=&quot;post&quot;>
<table border=&quot;0&quot; align=&quot;center&quot; cellpadding=&quot;2&quot; cellspacing=&quot;2&quot;>
<tr>
<td align=&quot;left&quot;>
<select name=&quot;s_type&quot; class=&quot;width&quot;>
<option value=&quot;-1&quot; 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 &quot; selected &quot; ;}?> value=<?php echo($r1->id);?>> <?php echo($r1->types);?> </option>
<?php
}
?>
</select>
</td>
</tr>
<tr>
<td align=&quot;left&quot;>
<select name=&quot;s_suburb&quot; class=&quot;width&quot;>
<option value=&quot;-1&quot; 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 &quot; selected &quot; ;}?> value=<?php echo($r1->id);?>> <?php echo($r1->sub);?> </option>
<?php
}
?>
</select>
</td>
</tr>
<tr>
<td align=&quot;left&quot;>
<select name=s_pricerange1 class=&quot;width&quot;>
<option value=&quot;-1&quot; selected>Price Levels </option>
<option <?php if($_POST['s_pricerange1']==1) {echo &quot; selected &quot; ;}?>value=&quot;1&quot;>Under
$250,000 </option>
<option <?php if($_POST['s_pricerange1']==2){ echo &quot; selected &quot; ;}?>value=&quot;2&quot;>$250,000-$500,000 </option>
<option <?php if($_POST['s_pricerange1']==3){ echo &quot; selected &quot; ;}?>value=&quot;3&quot;>$500,000-$750,000 </option>
<option <?php if($_POST['s_pricerange1']==4){ echo &quot; selected &quot; ;}?>value=&quot;4&quot;>$750,000-$1,000,000 </option>
<option <?php if($_POST['s_pricerange1']==5){ echo &quot; selected &quot; ;}?>value=&quot;5&quot;>$1,000,000
+ </option>
</select>
</td>
</tr>
<tr>
<td align=&quot;left&quot;>
<select name=s_status class=&quot;width&quot;>
<option value=&quot;-1&quot; selected>Choose status </option>
<option <?php if($_POST['s_status']==1) {echo &quot; selected &quot; ;}?>value=&quot;1&quot;>For
Sale </option>
<option <?php if($_POST['s_status']==2) {echo &quot; selected &quot; ;}?>value=&quot;2&quot;>For
Sale - Auction </option>
<option <?php if($_POST['s_status']==3) {echo &quot; selected &quot; ;}?>value=&quot;3&quot;>Under
Contract </option>
<option <?php if($_POST['s_status']==4) {echo &quot; selected &quot; ;}?>value=&quot;4&quot;>Sold </option>
</select>
</td>
</tr>
<tr>
<td align=&quot;left&quot;>
<select name=&quot;s_order&quot; class=&quot;width&quot;>
<option value=&quot;0&quot; selected>Display Order </option>
<option <?php if($_POST['s_order']==1) {echo &quot; selected &quot; ;}?>value=&quot;1&quot;>By
Suburb </option>
<option <?php if($_POST['s_order']==2) {echo &quot; selected &quot; ;}?>value=&quot;2&quot;>By
Most recent Listing </option>
<option <?php if($_POST['s_order']==3) {echo &quot; selected &quot; ;}?>value=&quot;3&quot;>By
Price (Lowest First) </option>
<option<?php if($_POST['s_order']==4) {echo &quot; selected &quot; ;}?> value=&quot;4&quot;>By
Price (Highest First) </option>
</select>
</td>
</tr>
<tr>
<td width=&quot;150&quot; align=&quot;left&quot;><div align=&quot;center&quot;>
<input type=&quot;hidden&quot; name=&quot;Submit2&quot;>

<input type=&quot;button&quot; value=&quot;Submit&quot; onclick=&quot;send()&quot;>

</div>
</td>
</tr>
</table>
</form>


I can supply code for whole apge if necessary.


Can anyone spot whatis wrong?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top