I have this code which works fine in every browser, except some people who use Win XP Home, IE6 (no service packs or anything) they do a search from the form (not shown), and get a brief glimpse of the results, and then IE switches to display the NoResults code. Every other browser, even past version of IE show the result if there is one, and only the error where there is not.
elseif($URI6=="editprodview"){
$SearchList=mysql_query("SELECT * FROM Products WHERE ID=\"$SearchID\"");
$num=mysql_num_rows($SearchList);
if($num==0){echo"$header $NoResults $footer";}else{
$i=0;
while ($i < $num) {
$ProdCat=mysql_result($SearchList,$i,"ProdCat");
$SubCat=mysql_result($SearchList,$i,"SubCat");
$SubCat3=mysql_result($SearchList,$i,"SubCat3");
$ID=mysql_result($SearchList,$i,"ID");
$ProdName=mysql_result($SearchList,$i,"ProdName");
$ProdPrice=mysql_result($SearchList,$i,"ProdPrice");
$ProdDesc=mysql_result($SearchList,$i,"ProdDesc");
$ProdImage=mysql_result($SearchList,$i,"ProdImage");
$ProdDate=mysql_result($SearchList,$i,"ProdDate");
$ProdMisc=mysql_result($SearchList,$i,"ProdMisc");
echo("$header
<form method=\"POST\" action=\"$PHP_SELF?URI6=editprodprocess\">
<font face=\"Arial\" size=\"-2\" >
<table border=\"1\" background=\"./Images/background.gif\" class=\"robert\"><tr>
<td valign=\"top\">Product ID:<br><input type=\"hidden\" name=\"ID\" value=\"$ID\">$ID</td>
<td valign=\"top\">Main Category:<br><input type=\"text\" name=\"ProdCat\" size=\"20\" value=\"$ProdCat\"></td>
<td valign=\"top\">Sub Category:<br><input type=\"text\" name=\"SubCat\" size=\"20\" value=\"$SubCat\"></td></tr><tr>
<td valign=\"top\" colspan=\"3\">Name:<br><input type=\"text\" name=\"ProdName\" size=\"40\" value=\"$ProdName\"></td></tr>
<td valign=\"top\" colspan=\"3\">Description<br><textarea rows=\"7\" name=\"ProdDesc\" cols=\"50\">$ProdDesc</textarea></td></tr>
<td valign=\"top\">Price:<br>$<input type=\"text\" name=\"ProdPrice\" size=\"6\" value=\"$ProdPrice\"></td>
<td valign=\"top\">2nd Subcat:<br><input type=\"text\" name=\"ProdMisc\" size=\"20\" value=\"$ProdMisc\"></td>
<td valign=\"top\">3rd Subcat<br><input type=\"text\" name=\"SubCat3\" size=\"20\" value=\"$SubCat3\"></td></tr>
<tr><td valign=\"top\" colspan=\"3\">Image SRC: <br><textarea rows=\"6\" name=\"ProdImage\" cols=\"42\">$ProdImage</textarea></td></tr>
<tr><td valign=\"top\" colspan=\"3\">
<input type=\"submit\" value=\"Save\">
</form> <a href=\"$PHP_SELF?URI6=deleteprod&ID=$ID&FileSource=$ProdImage\">[Delete this Listing]</a>
</td></tr></table></font>
$footer");
++$i;}}}
all you really need to look at I think is the line:
if($num==0){echo"$header $NoResults $footer";}else{
Because even if there are results, it starts the show the results, then jumps into showing $NoResults. This only happens in IE 6... any suggestions?