Re: Verify session in function
| From: | kaab kaoutar | Date: | Mon, 05 Mar 2001 17:43:54 +0000 |
| Subject: | Re: Verify session in function | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-42643@lists.php.net to get a copy of this message | ||
U just have to add global $PHPSESSID
to make the session variable global;
From: "Tobias Talltorp" <tobias@talltorp.com> To: php-general@lists.php.net Subject: [PHP] Verify session in function Date: Mon, 5 Mar 2001 18:30:00 +0100 I am building my first basic function to verify a session. If the verification is not in the function it works... What am I missing? (I couldn´t find anything about this in the mailing list archive) -- This works ------> session_start();_________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.if (isset($PHPSESSID)){ echo "ok"; } elseecho "not ok"; }-- This does not work -----> session_start(); verifySess(); function verifySess() {if (isset($PHPSESSID)){ echo "ok"; } elseecho "not ok"; }} Thanks, // Tobias -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net