and it has two entries for FirstName and LastName
I am simply trying to output this to the web browser using this PHP code and all I get is a blank page but no mysql records shown.
Here is the codel
Code: Select all
<?php
$username = "b9_3095165";
$password = "REMOVED";
$hostname = "REMOVED";
$dbh = mysql_connect($hostname, $username, $password)
or die("Unable to connect to MySQL");
$selected = mysql_select_db("b9_3095165_mmdb",$dbh)
or die("Could not select first_test");
$result = mysql_query("SELECT FirstName, LastName FROM Persons");
while ($row = mysql_fetch_array($result,MYSQL_ASSOC)) {
print " Name:".$row{'FirstName'}." ;
}
mysql_close($dbh);
?>