topical media & game development
basic-php-15-producttest.php / php
<?php
//connect to the database - either include a connection variable file or
//type the following lines:
query = "SELECT * FROM products";
query)
or die(mysql_error());
?>
<html>
<head>
<title>Product List</title>
</head>
<body>
<table>
<tr>
<td width="10%">Product Number</td>
<td width="20%">Name</td>
<td width="50%">Description</td>
<td width="10%">Price</td>
<td width="10%">Date Added</td>
</tr>
<?php
while (results)) {
extract(products_prodnum;
echo "</td><td width=\"20%\">";
echo products_proddesc;
echo "</td><td width=\"10%\">";
echo products_dateadded;
echo "</td></tr>";
}
?>
</table>
</body>
</html>
(C) Æliens
20/2/2008
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.