If I hide the "while" function code it prints the first row of the table - but if I unhide it I just get a blank white screen. I dont suppose anybody knows what Im doing wrong? Is the image causing an issue maybe? Thanks v much in advance
Jonty
<?php
$user_name = "Jonty";
$password = "xxxx";
$database = "Addressbook";
$server = "localhost";
$db_handle = mysql_connect($server, $user_name, $password);
if (!$db_handle)
{
die('Could not connect: ' . mysql_error());
}
$db_found = mysql_select_db($database, $db_handle);
$result = mysql_query("SELECT * FROM tbl_address_book");
if (!$result)
{
die('Could not select: ' . mysql_error());
}
echo "<table border='1'>
<tr>
<th>Category</th>
<th>City</th>
<th>Title</th>
<th>DateAv</th>
<th>Photo1</th>
</tr>";
while($row = mysql_fetch_array($result MYSQL_ASSOC))
{
echo "<tr>";
echo "<td>" . $row['Category'] . "</td>";
echo "<td>" . $row['City'] . "</td>";
echo "<td>" . $row['Title'] . "</td>";
echo "<td>" . $row['DateAv'] . "</td>";
echo "<td>" . $row['Photo1'] . "</td>";
echo "</tr>";
}
echo "</table>";
mysql_close($db_handle);
?>