hi
im learning php mysql from a book, have tested php seems to be working, but when test mysql page a created i get a blank page. would be great if someone could have a look and give me any pointers.
<html>
<head><title>Test MySQL</title></head>
<body>
<!-- mysql_up.php -->
<?php
error_reporting(E_ALL);
$host="localhost";
$user="root";
$password="numbertwo22";
$connect=mysqli_connect($host,$user,$password);
$sql="show status";
$result = mysqli_query($connect,$sql);
if ($result == false)
echo "<b>Error " . mysqli_errno() . ": "
. mysqli_error() . "</b>";
else
{
?>
<!-- Table that displays the results -->
<table border=”1”>
<tr><td><b>Variable_name</b></td>
<td><b>Value</b></td>
</tr>
<?php
for ($i = 0; $i < mysqli_num_rows($result); $i++) {
echo "<TR>";
$row_array = mysqli_fetch_row($result);
for ($j = 0; $j < mysqli_num_fields($result); $j++)
{
echo "<TD>" . $row_array[$j] . "</td>";
}
echo "</tr>";
}
?>
</table>
<?php } ?>
</body>
</html>
thanks
chris