* Thus wrote Ow Mun Heng ([EMAIL PROTECTED]):
> I'm new but.. aren't you also supposed to register the session??
>
> My code ..
>
> session_start();
> session_register('username');
> $_SESSION['username'] = $row['username'];
> session_register('user_id');
> $_SESSION['user_id'] = $row['user_id'];
> session_register('access_level');
> $_SESSION['access_level'] = $row['access_level'];
No that is incorrect.
<snip session_register()>
CAUTION:
If you are using $_SESSION (or $HTTP_SESSION_VARS), do not use
session_register(), session_is_registered(), and session_unregister().
</snip>
What happens if you register session_register('username') is that the
$_SESSION['username'] namespace is dedicated to the global variable
$username.
So, if in your script after your block of code, you use the variable
$username (global scoped) then your $row['username'] value you assigned
in $_SESSION['username'] is gone.
Curt
--
"I used to think I was indecisive, but now I'm not so sure."
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php