SitePoint Sponsor

User Tag List

Results 1 to 4 of 4

Hybrid View

  1. #1
    SitePoint Member
    Join Date
    Jan 2006
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    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.or...tabase-search/

    Any advice please

    kind regards

    Tony Prodger

    Code below:

    PHP Code:
    <!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>
    Last edited by SpacePhoenix; Oct 7, 2012 at 10:40. Reason: placed php tags around php code

  2. #2
    SitePoint Wizard silver trophybronze trophy Cups's Avatar
    Join Date
    Oct 2006
    Location
    France, deep rural.
    Posts
    6,869
    Mentioned
    17 Post(s)
    Tagged
    1 Thread(s)
    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.

    2. 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.

    3. 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'];

  3. #3
    SitePoint Member
    Join Date
    Jan 2006
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for that

    I will work on it now and let you know

  4. #4
    SitePoint Member
    Join Date
    Jan 2006
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •