I am trying to put the results of my query into a table on my webpage that i have made however, i am having problems as it prints some of the code out onto the webpage & doesn't display the table.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<link rel="stylesheet" type="text/css" href="minterface.css"/>
<head>
<title>Mountbatten School Stock</title>
</head>
<body>
<div id="container">
<div id="header">
<h1>
<img src="logo.gif"/>
</h1>
</div>
<div id="navigation">
<ul>
<li><a href="#">Home</a></li>
<li><a href="#">About</a></li>
</ul>
</div>
<div id="content-container1">
<div id="content-container2">
<div id="section-navigation">
<ul>
<li><a href="#">Stock</a></li>
</ul>
</div>
<div id="content">
<h2>
Stock Levels
</h2>
<p>
Welcome, to the
</p>
<p>
<?php
$connection = mysql_connect("localhost", "root", "");
$database = mysql_select_db("main", $connection);
$result= mysql_query("SELECT * FROM 'part', 'printer', 'tracking' WHERE printer.printerID = part.printerID AND part.partID = tracking.partID AND quantity BETWEEN 0 AND 3 LIMIT 0, 30 ");
echo "<table border='1'>";
echo "<tr> <th>Name</th> <th>Age</th> </tr>";
while($row = mysql_fetch_array( $result )) {
echo "<tr><td>";
echo $row['name'];
echo "</td><td>";
echo $row['age'];
echo "</td></tr>";
}
echo "</table>";
?>
</p>
<br />
<br />
</div>
<div id="aside">
<h3>
Help
</h3>
<p>
If you have any problems while viewing this page please contact IT support.
</p>
</div>
<div id="footer">
Copyright © Mountbatten School
</div>
</div>
</div>
</div>
</body>
</html>