I have read an introductory book on PHP 6/Mysql 5 and am using it as reference to build my code. I am trying to build a fairly basic set of code that will pull data from a mysql database. I have tried debugging the code several times, but I cannot determine what's causing the problem. 'Header.html' comes in fine, but I am seeing nothing after that. Any help would be very very appreciated. Thank you in advance.
<?php
$page_title = 'Welcome!';
include ('header.html');
// Set the database access information as constants:
DEFINE ('DB_USER', 'root');
DEFINE ('DB_PASSWORD', 'xxxxxx');
DEFINE ('DB_HOST', 'localhost');
DEFINE ('DB_NAME', 'hf');
// Make the connection:
$dbc = @mysqli_connect (DB_HOST, DB_USER, DB_PASSWORD, DB_NAME) OR die ("Unable to select database!");
$q = "SELECT name, assets, address, city, state FROM funds ORDER BY assets DESC";
$r = @mysqli_query ($dbc, $q);
echo '<table align="center" cellspacing="3" cellpadding="3" width="75%">
<tr><td align="left"><b>Name</b></td>
<td align="left"><b>Assets</b></td>
<td align="left"><b>Address</b></td>
<td align="left"><b>City</b></td>
<td align="left"><b>State</b></td></tr>
';
while ($row = mysqli_fetch_array($r,mysqli_assoc)){
echo '<tr><td align="left">' . $row['name'] . '</td>
<td align="left">' . $row['assets'] . '</td>
<td align="left">' . $row['address'] . '</td>
<td align="left">' . $row['city'] . '</td>
<td align="left">' . $row['state'] . '</td></tr>
';
}
echo '</table>';
mysqli_close($dbc);
?>
<h1>Content Header</h1>
<p>Content</p>
<?php
include ('footer.html');
?>