Here is my script..thing is that..am getting image under that name , description and price are coming…but how can i display image one side beside that all these(name,price,desc) follow sequence..
ref link: http://www.qualitycodes.com/tutorials/demos/php/shopping/products.php
<body>
<div id=cart align="center">
<table border="0" cellpadding="2px" width="600px">
<h1 align="center">Products</h1>
<?php
$sql = "SELECT serial, name, description, price,picture FROM products;";
$result = mysql_query($sql) or die (mysql_error());
while(list($id, $name, $description, $price,$picture) = mysql_fetch_row($result)) {
echo "<tr>";
echo "<td align=left>";
echo "<input type='button' onClick=\"window.open('cart.php?action=add&id=" . $id . "','_self');\" value='Add to Cart' />";
echo "<hr color=grey size=\"0\" >";
echo "</td>";
echo "</tr>";
}
?>
</table>
<a href="cart.php">View Cart</a>
<input type="image" src="submit.gif" alt="Submit" width="48" height="48" />
</div>
</body>
Use stylesheets