[PHP] Quick question regarding $_SESSION and header()
I should be able to set a session var and then do a header redirect right? Small bug regarding that and i just need to be sure. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Quick question regarding $_SESSION and header()
On Thu, Dec 11, 2008 at 2:01 PM, Ólafur Waage olaf...@gmail.com wrote: I should be able to set a session var and then do a header redirect right? Small bug regarding that and i just need to be sure. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php Yep, what bug are you running into? Remember you have session_start() on the next page for it to be there. -- -Dan Joseph www.canishosting.com - Plans start @ $1.99/month. Build a man a fire, and he will be warm for the rest of the day. Light a man on fire, and will be warm for the rest of his life.
Re: [PHP] Quick question regarding $_SESSION and header()
On Thu, Dec 11, 2008 at 14:01, Ólafur Waage olaf...@gmail.com wrote: I should be able to set a session var and then do a header redirect right? Small bug regarding that and i just need to be sure. This isn't a bug in PHP, it's actually in adherance with HTTP standards (and current browser standards). Prior to doing a header() redirect, you have to force the cookie to be written with session_write_close(). -- /Daniel P. Brown http://www.parasane.net/ daniel.br...@parasane.net || danbr...@php.net 50% Off Hosting! http://www.pilotpig.net/specials.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: [PHP-QA] Re: [PHP] Quick question regarding $_SESSION and header()
(Forwarding back to PHP General for the archives.) On Thu, Dec 11, 2008 at 14:31, Ólafur Waage olaf...@gmail.com wrote: Its fixed, thanks guys :) On Thu, Dec 11, 2008 at 7:16 PM, Daniel Brown danbr...@php.net wrote: On Thu, Dec 11, 2008 at 14:01, Ólafur Waage olaf...@gmail.com wrote: I should be able to set a session var and then do a header redirect right? Small bug regarding that and i just need to be sure. This isn't a bug in PHP, it's actually in adherance with HTTP standards (and current browser standards). Prior to doing a header() redirect, you have to force the cookie to be written with session_write_close(). -- /Daniel P. Brown http://www.parasane.net/ daniel.br...@parasane.net || danbr...@php.net 50% Off Hosting! http://www.pilotpig.net/specials.php -- PHP Quality Assurance Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php -- /Daniel P. Brown http://www.parasane.net/ daniel.br...@parasane.net || danbr...@php.net 50% Off Hosting! http://www.pilotpig.net/specials.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: [PHP-QA] Re: [PHP] Quick question regarding $_SESSION and header()
Whoops, sent the thanks to the wrong list :P On Thu, Dec 11, 2008 at 7:33 PM, Daniel Brown danbr...@php.net wrote: (Forwarding back to PHP General for the archives.) On Thu, Dec 11, 2008 at 14:31, Ólafur Waage olaf...@gmail.com wrote: Its fixed, thanks guys :) On Thu, Dec 11, 2008 at 7:16 PM, Daniel Brown danbr...@php.net wrote: On Thu, Dec 11, 2008 at 14:01, Ólafur Waage olaf...@gmail.com wrote: I should be able to set a session var and then do a header redirect right? Small bug regarding that and i just need to be sure. This isn't a bug in PHP, it's actually in adherance with HTTP standards (and current browser standards). Prior to doing a header() redirect, you have to force the cookie to be written with session_write_close(). -- /Daniel P. Brown http://www.parasane.net/ daniel.br...@parasane.net || danbr...@php.net 50% Off Hosting! http://www.pilotpig.net/specials.php -- PHP Quality Assurance Mailing List http://www.php.net/ To unsubscribe, visit: http://www.php.net/unsub.php -- /Daniel P. Brown http://www.parasane.net/ daniel.br...@parasane.net || danbr...@php.net 50% Off Hosting! http://www.pilotpig.net/specials.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php