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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

intermittent problem

Status
Not open for further replies.

boyfromoz

Technical User
Feb 1, 2001
469
AU
I designed a site, and got a friend to write the code for it


Proeprties pae has a search fucntion. It works, sometimes and sometimes not. If I click on refresh, it works the next search, if I don't... it sometimes won't work.


Any ideas on what could be causing this?
 
It would be a bug in your code to do with first case on certain variables I imagine but I'm afraid without the code you won't get much help

Jo
 
this is the form that works intermittently

<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;submit&quot; name=&quot;Submit2&quot; value=&quot;Submit&quot;>
</div>
</td>
</tr>
</table>
</form>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top