Why does the following code not print to the browser? I am trying to return a query from a database immediately upon the loading of a webpage.
The following only brings up a blank page.
Thank you for your help.
.....................
$test = "";
if ($test == ""){
{
$con = mysql_connect("","","");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
}
mysql_select_db("", $con);
$result = mysql_query("SELECT * FROM table");
while($row = mysql_fetch_array($result))
{
echo $row['FirstName'] . " " . $row['LastName'];
echo "<br />";
}
mysql_close($con);
}
.....................