Jump to content

No MySQL results w/ IE


Guest malcolmclark
 Share

Recommended Posts

Guest malcolmclark

When accessing the MySQL table, Firefox displays the results correctly but IE will not. This is a snippet from my calling html file - prod_get.php. The "action" calls the same file that the MySQL query resides in.

<form action="prod_get.php" method="POST" ><input type="image"  name="msearchitem" src="butt_chairs.jpg" value="CHAIRS"></input>

The code creates the table for displaying the results. IE gives me a blank screen with no results. Firefox does display results correctly.

$result = mysql_query("SELECT * FROM products where prod_cat = '{$_POST["msearchitem"]}' order by 'prod_id'", $connect) or die('Error, insert query failed');while ($query_data = mysql_fetch_row($result))  {echo "<tr><td width=300><center><img src=\"pics/" , $query_data[6],"\"></center></td><td width=250 valign=top>";echo "<b>",$query_data[8],"</b><br>#<b><font size=-1>",$query_data[1], "</font></b><br><font size=-1>", $query_data[9],"</font><br>";echo "<table border=1 width=250><tr><td>48(3R)</td><td>144</td><td>500</td><td>500+</td></tr><tr><td>",$query_data[10],"</td><td>",$query_data[11],"</td><td>",$query_data[12],"</td><td>Quote</td></tr></table><P><hr width=75%><P>";echo "</td></tr>";}echo "</td></tr></table>";

Link to comment
Share on other sites

If Firefox displays the results then it's neither an SQL or a PHP problem, there must be something in the end HTML that IE doesn't like, can you give us that to have a look at? (i.e. the source code that is sent to the browser after all PHP is parsed)

Link to comment
Share on other sites

One thing you might try is to remove the </input> closing tag, it's not necessary. IE might be confused over that. If you are going for XHTML conformity, you can close the input tag like this:

<input type="image"  name="msearchitem" src="butt_chairs.jpg" value="CHAIRS" />

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...