note 12728 deleted from features.cookies by jimw

From: Date: Thu, 20 Dec 2001 21:19:44 +0000
Subject: note 12728 deleted from features.cookies by jimw
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-23426@lists.php.net to get a copy of this message
To suppliment the comment about refreshing the page above: If you are frustrated that the new cookie value cannot be used until the page is refreshed try to cut and paste this code: <?PHP ob_start();//Allows the cookie to be run after the code. echo "you can run whatever you want here. The cookie will be set after."; setcookie ("session", "cookievalue"); echo " <html> <head> <META HTTP-EQUIV=\"Refresh\"CONTENT=\"0;URL=foo.php\"> </head> </html>";//Meta tag needed to refresh the cookie. ob_end_flush();//Calles the buffered data. ?> The page called after the cookie is defined is foo.php. When foo.php loads, the cookie will be availible. And there was much rejoicing.

« previous php.notes (#23426) next »