> I have some code that looks like this:
>
> if(!session_is_registered('errors'))
> session_register('errors');
>
> but i want to do this using the $_SESSION, i tried
> doing it this way
>
> if(!isset($_SESSION['errors']))
> session_register('errors');
>
> but when i echo(isset($_SESSION['errors'])) it prints
> false
>
> So i am not sure how to register a variable with
> $_SESSION
You don't need to use session_register() when you're using $_SESSION.
Just treat $_SESSION as any other variable and assign values to it. To
remove values from it, use unset().
if(!isset($_SESSION['errors']))
{ $_SESSION['errors'] = 'default'; }
---John Holmes...
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php