Verify session in function
| From: | Tobias Talltorp | Date: | Mon, 05 Mar 2001 17:30:00 +0000 |
| Subject: | Verify session in function | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-42638@lists.php.net to get a copy of this message | ||
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();
if (isset($PHPSESSID)){
echo "ok";
} else
echo "not ok";
}
-- This does not work ----->
session_start();
verifySess();
function verifySess() {
if (isset($PHPSESSID)){
echo "ok";
} else
echo "not ok";
}
}
Thanks,
// Tobias