Problem with cookies

From: Date: Sat, 24 Mar 2001 00:03:43 +0000
Subject: Problem with cookies
Groups: php.general 
Request: Send a blank email to php-general+get-45369@lists.php.net to get a copy of this message
Hello: I've set up a authentication script in PHP, and have made it to where once the user has been successfully authenticated, it puts the username ($global[username]), password ($global[password]), and realname ($global[realname]) into a cookie. The included functions file (./inc/common.inc) does this, my problem is: Once it has been authenticated, the main page (index.php) goes through an if statement for the variable $authok, if $authok is "1", then display the main page, elseif $authok != 1, then display login, it displays the main page fine except, the realname and the username don't show up, until I reload the page and the realname and the username then show up. I don't understand why it is doing this. Please if you can, help me fix this. Thanks a lot Rob Vella

« previous php.general (#45369) next »