|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2001-03-22 05:53 UTC] royerj at free dot fr
Althought the transient_id option is active, the session_id is lost after using the header() method in order to redirect to another script. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 05 10:00:02 2025 UTC |
You're right, the session id is not added when doing redirects. You have to do it 'manually', with something like this: header("Location: $url.'?$PHPSESSID'"); Reclassified as documentation problem. Note: IIRC there's also feature/change request about this. --JaniI've tried the recommended solution==> header("Location:$url.'?$PHPSESSID'"); This fails for me. My example: $SID1=$SID // * up at the top Header ("Location:registration.php.'?$SID1'"); Notice the strange registration.php. in the middle. Well php doesn't like it either. Any other recommendations?oops..my example was buggy..it should be something like this: header("Location: $someurl".'?'.session_name().'='.session_id());