On Mon, Dec 05, 2005 at 02:45:43PM -0600, [EMAIL PROTECTED] wrote:
> Is this possible at all:
> I have stored info from form in session:
> $_SESSION['client']['name'] = 'Name'
> $_SESSION['client']['address'] = 'Address'
> $_SESSION['client']['city'] = 'City'
> $_SESSION['client']['state'] = 'State'
> $_SESSION['client']['zip'] = 'Zip
> 
> Now, I want to unregister all $_SESSION['client'] info EXCEPT 
> $_SESSION['client']['name'].

All you need to do is redifine what the $_SESSION['client'] array's
definition is:

  $_SESSION['client'] = array('name' => $_SESSION['client']['name']);


> 
> With
> session_unregister('client');

Don't mix session_*register() functions with the use of $_SESSION.
Those functions are only there for old scripts to work, see
http://php.net/session_unregister (the second Caution)

To register a session var:

  $_SESSION['client'] = $client;

To unregister a session var:

  unset($_SESSION['client']);

Curt.
-- 
cat .signature: No such file or directory

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to