,我不熟悉CI的会议,请帮助我皈依笨
if (!isset($_SESSION["gids"])) {
$_SESSION["gids"] = array();
}
//check for current product in visitor's shopping cart content
$i=0;
while ($i<count($_SESSION["gids"]) && $_SESSION["gids"][$i] != $_GET["add2cart"]) $i++;
if ($i < count($_SESSION["gids"])) //increase current product's item quantity
{
}
else //no such product in the cart - add it
{
$_SESSION["gids"][] = $_GET["add2cart"];
}