Hi All,
I am trying to write a dynamically built table from my db and I am not getting results?
Here is my code:
$conn = mysql_connect("localhost", "x", "x")
OR DIE (mysql_error());
@mysql_select_db ("inthecla_products", $conn) OR DIE (mysql_error());
// Select the DB
$db_selected=mysql_select_db("inthecla_products");
if(!$db_selected){
die(mysql_error());
}
if ($x = mysql_query("SELECT * FROM inthecla_products")) {
while($result = mysql_fetch_assoc($x)) {
?>
<td><table width="100%" border="0">
<tr>
<td width="13%" rowspan="2"><div align="center"><a href="http://www.intheclassroom.com/cgi-bin/storefront.cgi?page=prod&prod=<?php echo($result['ProdID']); ?>" target="_blank"><img src="../images/<?php echo($result['Image']); ?>" alt="ITCM-In-The-Classroom-Media-John-Stossel-Greed-Video" width="100" height="100" border="0"></a></div></td>
<td class="font"><div align="center">
<table width="100%" border="0">
<tr>
<td width="44%"><div align="left"><span class="headerLarge">Stossel
in the Classroom</span></div></td><td width="1%"></td>
<td width="55%"><div align="left"><a href="http://www.intheclassroom.com/cgi-bin/storefront.cgi?page=prod&prod=<?php echo($result['ProdID']); ?>" target="_blank"><img src="../images/<?php echo($result['Logo']); ?>" alt="ITCM-In-The-Classroom-Media-John-Stossel-Greed" width="91" height="42" border="0"></a></div></td>
</tr>
</table>
</div></td>
</tr>
<tr>
<td width="87%" class="font"> <div align="left"><img src="http://www.intheclassroom.com/_default_designs/images/siteImages/clear_pixel.gif" height="8" width="1"><?php echo($result['ShortDescription']); ?></div></td>
</tr>
</table></td>
<?php
}
} else {
echo("query = no dice,either your connection is bad, or there are no items to display");
}
I know I am missing something simple, just not obivous to me at this point.
Thanks for the help in advance,
Don