The following code fails to display the data in the html table.
I have tried to change a database field to a name that is not present in the database table
No PHP errors are shown, i dont even think the script is even connecting to the database..
What am i doing wrong?
<?php
//--------------- Connection Script ----------------------------\\
$username = "********";
$password = "********";
$hostname = "********";
$dbh = mysql_connect($hostname, $username, $password)
or die("Unable to connect to MySQL");
//------------------- Select Database --------------------------\\
$selected = mysql_select_db("dutty_dp",$dbh)
or die("Could not select first_test");
?>
</head>
<body>
<?
$query = "SELECT `Product_picurl`, `Product_Name`, `Product_Description`, `Product_price`, `Product_Category`, `Product_Pdf`,
`Product_Cart`, `Product_Features`, `Product_subcat`, `Key` FROM `prod_listing` where `Product_subcat` = 'Absorption Panels'"; ?>
<table width="42%" cellpadding="1" cellspacing="0">
<? while ($row=mysql_fetch_array($query)) { ?>
<tr>
<td height="16" colspan="2" valign="top"><div align="center"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">
<?php echo $row["Product_Name"];?> / Product ID <?php echo $row["Product_Id"] ;?></font></div></td>
</tr>
<tr>
<td width="19%" height="108"><div align="justify"><?php echo $row["Product_picurl"];?>
<p align="center"> £<?php echo $row["Product_price"];?></div></td>
<td width="81%" valign="top"><?php echo $row["Product_Description"];?></td>
</tr>
<tr>
<td height="25" colspan=2><p align="center"><a href="#">Add to Cart</a></p>
</td>
</tr>
<? } //end of loop ?>
</table>
Can some one please help?
Thanks in advance