ok im just trying to display some data from a database- however it wont display, ive checked all the variables and names in the corresponding forms and in the mySQL database and they are all ok. Why wont the names display anymore! (as they were a few hours ago but i cant remember what ive messed up.). The items are definately being added to the database too.
Here's the code to (try) and show the items:
<html>
<head><title>Subbuteo catalog</title></head>
<body topmargin="0" marginheight="0">
<?php
include("donuts.inc");
$connection = mysql_connect($host,$user,$password)
or die ("couldn't connect to server");
$db = mysql_select_db($database,$connection)
or die ("Couldn't select database");
$query = "SELECT * FROM Products
WHERE productType=\"{$_POST['Novelty Items']}\""; #27
$result = mysql_query($query)
or die ("Couldn't execute query.");
/ Display results in a table /
echo "<table cellspacing='10' border='0' cellpadding='0'
width='100%'>";
echo "<tr><td colspan='5' align='right'>
Click on any picture to see a larger
version.<br><hr>
</td></tr>\n";
while ($row = mysql_fetch_array($result,MYSQL_ASSOC)) #38
{
$f_price = number_format($row['price'],2);
echo "<tr>\n";
echo "<td>{$row['productID']}</td>\n";
echo "<td><font size='+1'>
<b>{$row['productName']}</b></font></td>\n";
echo "<td>{$row['description']}</td>\n";
echo "<td><a href='../images/{$row['image']}'
border='0'>
<img src='../images/{$row['image']}' border='0'
width='100' height='80'></a></td>\n";
echo "<td align='center'>\$$f_price</td>\n
</tr>\n";
echo "<tr><td colspan='5'><hr></td></tr>\n";
}
echo "</table>\n";
?>
</body></html>