You have to do session_start (); in your check script before anything else.
- Russ
---
Toolshed Computer Productions - Professional PHP Hosting
Hosting - Dedicated Servers - Design - Programming
http://www.toolshed51.com
-----Original Message-----
From: Chris Lee [mailto:[EMAIL PROTECTED]]
Sent: Thursday, June 21, 2001 7:40 AM
To: [EMAIL PROTECTED]
Subject: Re: [PHP] Problem with session_is_registered
I just check the var.
if (isset($HTTP_SESSION_VARS['count']))
echo "
Yes its all set :)
";
--
Chris Lee
[EMAIL PROTECTED]
""news.php.net"" <[EMAIL PROTECTED]> wrote in message
9gss6k$kud$[EMAIL PROTECTED]">news:9gss6k$kud$[EMAIL PROTECTED]...
> 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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]