note 17302 added to function.session-set-cookie-params

From: Date: Mon, 03 Dec 2001 21:34:06 +0000
Subject: note 17302 added to function.session-set-cookie-params
Groups: php.notes 
Request: Send a blank email to php-notes+get-21577@lists.php.net to get a copy of this message
I got a problem with my sesion: I got a sesion in a shopping cart and I can't make it possible selecting diferent products from the cart for deleting them from the cart. First I got the session_start: session_start(); session_register('itemsEnCesta'); if ($descripcion&&$familia1&&$pesetas&&$euros1&&$codigo1){ if (!isset($itemsEnCesta)){ $itemsEnCesta[$descripcion][1]=$cantidad; $itemsEnCesta[$descripcion][2]=$pesetas; $itemsEnCesta[$descripcion][8]=$familia1; $itemsEnCesta[$descripcion][5]=$euros1; $itemsEnCesta[$descripcion][7]=$codigo1; }else{ foreach($itemsEnCesta as $k => $v){ if ($descripcion==$k){ $itemsEnCesta[$k][1]+=$cantidad; $encontrado=1; } } if (!$encontrado) { $itemsEnCesta[$descripcion][1]=$cantidad; $itemsEnCesta[$descripcion][2]=$pesetas; $itemsEnCesta[$descripcion][8]=$familia1; $itemsEnCesta[$descripcion][5]=$euros1; $itemsEnCesta[$descripcion][7]=$codigo1; } } } later it comes the : if (isset($itemsEnCesta)){ BLABLA foreach($itemsEnCesta as $k => $v){ BLABLA } }I wanna make a selectbox for each product in the sesion for deleting the selected product but I don't know how to delete information from a sesion. -- http://www.php.net/manual/en/function.session-set-cookie-params.php http://master.php.net/manage/user-notes.php?action=edit+17302 http://master.php.net/manage/user-notes.php?action=delete+17302 http://master.php.net/manage/user-notes.php?action=reject+17302

« previous php.notes (#21577) next »