From: "Angelo Zanetti" <[EMAIL PROTECTED]>
> 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");

This should be a complete URL to begin with:
http://www.yourdomain.com/whatever/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:

Using IE?

Try using session_write_close() right before you redirect with the header()
and be sure to put exit() directly after header(). Should look like this
anytime you want to redirect.

session_write_close();
header(...);
exit();

If that doesn't work, then pass the session ID in the URL when you redirect
like someone else mentioned.

---John Holmes...

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to