NextGenForum.net Posted December 16, 2007 Share Posted December 16, 2007 if($total_results >0){ $rs = mysql_query($sql); $j =1; while($line = mysql_fetch_assoc($rs)){ include('results_stub.tpl'); $j++; } } else{ echo "Try searching again"; } if($last != 1){ echo "Pages: "; for($i=1;$i<($last+1);$i++){ echo '<a href="?search_text='.$search_txt.'&pagenum='.$i.'">'.$i.'</a> | '; } } } Can you see any errors here?? www.selectgreen.co.uk When you click go leaving the box empty you get this; Try searching againPages: Im guessiong its a code error thats causing this. Any help appreciated thanks Quote Link to comment Share on other sites More sharing options...
revraz Posted December 16, 2007 Share Posted December 16, 2007 No errors really, just misplaced logic. So you have $total_results at 0, then it goes to your else line, which does the first Try searching again echo, then $last appears to not equal 1 so you get your next echo of Pages: So if that is a valid logic flow for your code, then just put a BR after Try searching again so it puts Pages on the next line. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.