MySQL Data not displaying correctly in IE9

I have a program that shows a list of Fuchsia Flowers and displays them in a Table in a Wordpress Popup Screen.
It doesn’t display correctly in IE (displays as a single line), works perfectly in Google Chrome and adequately in Firefox

URL here: http://www.americanfuchsiasociety.org/articledirectory/fuchsia-database-search/

Any advice please

kind regards

Tony Prodger

Code below:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head>
  
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  <title>Untitled Document</title>
  
  
  <style type="text/css">
<!--
-->
  </style>
</head><body>

<?php $dbh=mysql_connect ("localhost", "afs_tony", "suncity") or die ('I
cannot connect to the database because: ' . mysql_error());
mysql_select_db ("afs_afs");

$query = "SELECT * FROM reglist order by
cultivar";


$result = mysql_query($query);
set_time_limit(0);
echo "<table border ='2'>";
echo "<table align = 'center'>";
echo " ";
echo " ";
echo " ";


echo "<tr><td>";
echo "<u><strong>Cultivar</strong></u>";
echo "</td><td>";
echo "<u><strong>Hybridizer</strong></u>";
echo "</td><td>";
echo "<u><strong>Year</strong></u>";
echo "</td><td>";
echo "<u><strong>Form</strong></u>";
echo "</td><td>";
echo "<u><strong>Growth</strong></u>";
echo "</td><td>";
echo "<u><strong>Corolla Color</strong></u>";
echo "</td><td>";
echo "<u><strong>Sepal Color</strong></u>";
echo "</td><td>";
echo "<u><strong>Tube Color</strong></u>";
echo "</td><td>";
echo "<u><strong>Parentage</strong></u>";
echo "</td><td>";
while ($row = mysql_fetch_array($result))
{
echo "</tr><td>";
echo $row['Cultivar'];
echo "</td><td>";
echo $row['Hybridizer'];
echo "</td><td>";
echo $row['Year'];
echo "</td><td>";
echo $row['Form'];
echo "</td><td>";
echo $row['Growth'];
echo "</td><td>";
echo $row['Corolla Color'];
echo "</td><td>";
echo $row['Sepal Color'];
echo "</td><td>";
echo $row['Tube Color'];
echo "</td><td>";
echo $row['Parentage'];
echo "</td><td>";




}
mysql_close();



?>
<br />

<br />

</body></html>

PHP does not effect the view for which each browser views the content.

PHP (at your instruction) builds up a stream of HTML and spits it out.

If IE subsequently cannot decipher that stream of HTML then that is your fault (or IEs fault ;))

So, to sort out what is wrong with your HTML stream you have some options:

1 View html source - PHP pumped that source out. Can you see badly nested <table> elements? That could be the problem, go back and edit the PHP which creates the source.

  1. Remove ALL the <table> markup (and all the rest of the u, i tags etc) and then start replacing them one by one, at each iteration check the output in your target browser.

  2. Create the table using STATIC html with a couple of test values, then, when you have aced that, replace those values with PHP echoed values.

ps Do you really have a table column called “Tube Color” containing a space??

$row[‘Tube Color’];

Thanks for that

I will work on it now and let you know

Hi Cups

you were right - there was a large chunk of html missing. Fixed now, don’t know how it even worked in Google Chrome.
Thanks Again