Re: Problem with session_is_registered
| From: | kaab kaoutar | Date: | Thu, 21 Jun 2001 15:32:13 +0000 |
| Subject: | Re: Problem with session_is_registered | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-54753@lists.php.net to get a copy of this message | ||
u should start the session first (session_start(), then check registration!
From: "news.php.net" <silvervelvet@gmx.de> To: php-general@lists.php.net Subject: [PHP] Problem with session_is_registered Date: Thu, 21 Jun 2001 15:25:35 +0200 hi everybody, maybe I get smth. wrong, but as far as I know the function "session_is_registered()" is used to find out if a var is registered in a session... ok, now here is my example: [ index.php ] <?php $count = ""; session_start(); session_register ("count"); $count = "1"; ?> . . . <a href="check.php">NEXT</a> [ check.php ] <?php if (session_is_registered("count")) { echo "yes, count is reg.<br>"; } else { echo "no, count is not reg.<br>"; } ?> . . . now, check.php always writes "no, count is not reg.", but I don't really understand, why! do I have to run a -> session_register ("count"); <- before using "session_is_registered"? But if I do this, there is no need to check for the var with "session_is_registered"....because I know the var is registered.... maybe someone can help me out or point me to a good tutorial about sessions.... thx in advance :) andi -- 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_________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.