I'm trying to display some results in a simple table but nothing is being diplayed.
The headings of the table are being diaplyed but no results are being displayed
I've quries the table using a simple print statement just to check that results are there and the results are being displayed.
the code I'm using is as follows
Code: Select all
<html>
<body>
<?
$hostname="localhost";
$mysql_login="root";
$mysql_password="*********";
$database="coachhouse";
$connect = mysql_connect("$hostname", "$mysql_login" , "$mysql_password");
$table_name = "emp_order";
mysql_select_db($database);
echo "<table width="700" height="85" cellpadding="0" border="1" cellspacing="0">";
echo "<tr><td> Order id</td><td></td><td> Item Description</td><td> Quantity</td><td> Comments</td><td> username</td>";
$result = mysql_query ("SELECT order_id, item_description, quantity, comments, user_name FROM emp_order",$connect);
while ($row = mysql_fetch_row($result))
{
$id= $resultї'order_id'];
$item_description= $resultї'item_description'];
$quantity= $resultї'quantity'];
$comments= $resultї'comments'];
$user_name= $resultї'user_name'];
echo "<tr><td>". $id . " </td><td> " .$item_description. " </td><td>". $comments . "</td><td> " .$user_name. " </td>";
}
echo "</table>";
mysql_close($connect);
?>
</table></body></HTML>Can anyone help, I'm not an expert at PHP as you might tell
Or could you point to the direction of a simple table format result query display example
Shab