Hi there,
Try to add the session_id(); into the redirection:
header("Location: ../admin/include/B.php?PHPSESSID=" . session_id() );
Works for me though...
Greetings,
-Ron
-----Urspr�ngliche Nachricht-----
Von: Angelo Zanetti [mailto:[EMAIL PROTECTED]
Gesendet: Dienstag, 10. August 2004 13:51
An: [EMAIL PROTECTED]
Betreff: [PHP] sessions not working when page redirects
Hi all,
Im having a slightly weird problem with my session variables. when on a
certain page call it "A", I register a session variable and assign it a
value. I then test if it is registered successfully and has the correct
value on the same page, that works no problem. After that page "A"
redirects to page "B":
header("Location: ../admin/include/B.php");
After this I do the exact same test on page "B" to test for successful
registration and value and I get that the session variable is not
registered. on page "B" I do have session_start(); at the top. I even do
2 tests to on the session variable:
if (session_is_registered("myvar"))
and
if (isset($_SESSION["myvar"]))
and they both tell me that the session variable is not registered. what
could be causing the sesssion variable not to be remembered from page to
page. I am using register_globals=on;
any ideas/comments?
Thanks
Angelo
--------------------------------------------------------------------
Disclaimer
This e-mail transmission contains confidential information, which is the
property of the sender.
The information in this e-mail or attachments thereto is intended for the
attention and use only of the addressee.
Should you have received this e-mail in error, please delete and destroy it
and any attachments thereto immediately.
Under no circumstances will the Cape Technikon or the sender of this e-mail
be liable to any party for any direct, indirect, special or other
consequential damages for any use of this e-mail.
For the detailed e-mail disclaimer please refer to
http://www.ctech.ac.za/polic or call +27 (0)21 460 3911
--
PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:
http://www.php.net/unsub.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php