title: PHP not displaying MYSQL result
body: <p>I created a script on a windows platform which connects to the mysql database and returns the results of a table.  A very basic script which I wrote to simply test my connection worked.  The script works fine on my windows machine but not on my new mac.  On the mac it simply does not display any records at all.</p>
  
  <p>I know that the database connection has been established because there is no error but I can not see why the result set is not being displayed on screen, as I said it worked fine on my windows machine.</p>
  
  <p>The Mac has mysql (with data) and apache running for php.</p>
  
  <p>Please could someone help as I have no idea what to do now?</p>
  
  <p>Script below:</p>
  
  <pre><code>$dbhost = 'localhost';
  $dbuser = 'root';
  $dbpass = 'root';
  
  $conn = mysql_connect($dbhost, $dbuser, $dbpass) or die ('Error connecting to mysql');
  
  $dbname = 'test';
  
  mysql_select_db($dbname);
  
  mysql_select_db("test", $conn);
  
  $result = mysql_query("SELECT * FROM new_table");
  
  while($row = mysql_fetch_array($result))
    {
    echo $row['test1'] . " " . $row['test2'] . " " . $row['test3'];
    echo "&lt;br /&gt;";
    }
  
  mysql_close($con);
  </code></pre>