Make sure you session_write_close() before you redirect so the session data has a chance to be written.
Charlie "St Ooi" <[EMAIL PROTECTED]> wrote in message 005001c1a302$9d1f97c0$0100000a@mis">news:005001c1a302$9d1f97c0$0100000a@mis... I have a problem with session and redirection. I have setup 2 testing file. index.php will start the session, set the session variable and redirect it to index-full.php. However, in index-full.php, I cannot see the output that I expected. it should be "trial is Ooi Soo Tuck". The output is "trial is" which mean that the session variable is not registered or expired. If I remove the header function and replace it with a link to index-full.php, I get the output that I expected. Why header function will cause session not working? (index.php) <? session_start(); $trial="Ooi Soo Tuck"; session_register("trial"); header("Location: index-full.php"); exit; ?> (index-full.php) <? session_start(); print ("trial is ".$trial); ?> any help would be appreciated. Thanks ST Ooi Malaysia -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]