i am working a cart system and i want it so it displays the Item name and that is a link so when you click it you get more infomation about it.
now with this it should display ?id=ID NUMBER but instead i get this error
[QUOTE]
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in C:Program FilesApache GroupApache2htdocscgrproducts2.php on line 6
[code=php]<?php
if(isset ($_REQUEST[“id”])){
mysql_pconnect(“localhost”,”root”,”password”);
mysql_select_db(“cart”);
$result = mysql_query(“select * from items where id=” . $_REQUEST[“id”]);
$r=mysql_fetch_array($result);
$name=$r[“itemName”];
$desc=$r[“itemDesc”];
$price=$r[“itemPrice”];
echo “<h1>$name</h1>”;
echo “$desc”;
echo “$price”;
echo “<p><a href=”cart.php?action=view”>Your Shopping Cart</a></p>”;
}
else {