Okay all smart people out there...or at least smarter than me. 🙂 I need some help. I'm trying to get my store products into a database and well I need help displaying them. I've got each product in it's own little mysql row and the id of the product number. What I want to do is display them in two columns accordingly.
Product1 | Product 2
Product3 | etc....
Here's my little code:
<?php include( 'dbinfo.php' );
$conn = mysql_connect( $dbhost, $dbuser, $dbpass );
mysql_select_db($dbname); ?>
<table border=0 cellpadding=5 cellspacing=0 height="120" width="100%" align="center"><tr>
<?php
if ($id) {
$result = mysql_query("SELECT * FROM keyrings WHERE id=$id");
$myrow = mysql_fetch_array($result);
}
?>
<td>
<?php printf("%s\n", $myrow["html"]); ?>
</td></tr><tr><td><?php printf("%s\n", $myrow["html"]); ?>
</td></tr><table>
Maybe my code is all whacked. Anyhow, it's not displaying a dog gone thing. There's gotta be a better way (if not THE way) to get the 'html' to display respectively without doing two php prints in two columns.
I'd appreciate any help. Thank you and have a wonderful day! 🙂