Code: Select all
session_start();
$idinc = ($idinc + 1);
$buyid=('buyid'.$idinc);
if(isset($_REQUEST['buyid']))
{
$buyid = $_REQUEST['buyid'];
$_SESSION['buyid']=$buyid;
} else { $buyid=$_SESSION['buyid'];
}
echo "$buyid";
<a href='index.php?page=product&product=$row->id&s=$row->subid&c=$row->catid&cname=$row->catname&sname=$row->subname&menu=sub&buyid=$row->id'>Buy Now</a>This isn't storing anything. Maybe I am going about this the wrong way. The idea being that you can store all the product ids you want in your "cart", and then you extract it from the database later on, based on the "buyid" in the Cart page.
Can anyone help me please?