note 20160 rejected from ref.session by alindeman

From: Date: Mon, 25 Mar 2002 15:30:31 +0000
Subject: note 20160 rejected from ref.session by alindeman
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-28184@lists.php.net to get a copy of this message
<pre> PHP 4.1.2 --> $_SESSION or $HTTP_SESSION_VARS don't save data. The new SuperGlobal array $_SESSION don't save my data in session files Example 1 don't work ==================== session_start(); if(empty($HTTP_SESSION_VARS['cart'][$HTTP_GET_VARS['item']])){ $HTTP_SESSION_VARS['cart'][$HTTP_GET_VARS['item']] = $HTTP_GET_VARS['qty']; }else{ $HTTP_SESSION_VARS['cart'][$HTTP_GET_VARS['item']] += $HTTP_GET_VARS['qty']; } But, it works with the older sentences (Ex.2) Example 2 work ============== session_start(); if(!session_is_registered('cart')) session_register('cart'); empty($cart[$item]) ? $cart[$item] = $qty : $cart[$item] += $qty ; To make it works i need to enable global_vars ==================================================================== My intention is to disabled global_vars and use track_vars Please helpme I use Win98 and PHP 4.1.2 for development My name is Cesar and write from Montevideo/URUGUAY South America. cesar@fastlink.com.uy Thanks </pre>

« previous php.notes (#28184) next »