|
Hi
Ive run into a problem with a login logout script which im trying to wrtie with ajax post requests. It all works as it should, except the my $_SESSION[activeuserid] variable (which is set and unset by my login() and logout() functions) is not getting set until i refresh the page.
For example, i call login.php through an AJAX request (login())which sets $_SESSION[activeuserid]. Then, once my login() function has finished executing, checkLogin() runs to establish whether or not the user is logged in, displaying the appropriate information. Although Login() has just changed the $_SESSION[activeuserid] variable, checkLogin() doesnt seem to read it until i reload the page.
Can anybody tell me is this is standard behaviour?
|