hi, i am trying to make a simple catalog website without checkout. the user clicks on a product he want and it's displaced on another page...simple. the first page (the one with the product list) has the following code...
on the next page (viewprod.php) i have no idea what to put on the page to call up the product clicked. i know i read it in my books but i cant find it anywhere...can someone help?
Thanks
i just got around to using the code. i sorry i dont really understand the code. first, why do you need $colname_rs_ID = "-1";, why is it -1? And second, arent hidden fields used to get data submitted from a form not to output it?
when you build the link for your product detail page, use $row['prod_id'] (or how your id column is named in your DB) instead of $row['prod_name'].
after that, in your product page do:
if(isset($_GET['id']))
{
$id = $_GET['id'];
// show details for this ID
}
else
{
echo "Sorry!!! We don't have this product!"
@ryan_vietnow
i have tried the code out but i have one question. Whats the point of adding the "0" to ($result,0,"id"); and the other lines? i erased the "0" when i was testing the code and there seemed to be no difference. when i changed the number to 5 or something else i get the folloting error:
Warning: mysql_result() [function.mysql-result]: Unable to jump to row 5 on MySQL result index 3 in D:\AppServ\www\Study_Practice\Test_Sites\Shopping Cart\showitem.php on line 22
i'm just wondering is all. from what i get, the point of the "0" is to tell mysql which row to start searching. if i'm mistaken pls correct me
Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.
This thread is more than three months old
No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.