Re: session vars not being read?
| From: | Richard Lynch | Date: | Wed, 06 Dec 2000 03:29:23 +0000 |
| Subject: | Re: session vars not being read? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-28830@lists.php.net to get a copy of this message | ||
Has he set his browser to refuse all cookies?
If so, you either convince him to turn cookies on, or encode all your URLs
and FORMs to have his SID in them, or recompile PHP with --enable-trans-sid
(sp?).
----- Original Message -----
From: Static <me@143.com>
Newsgroups: php.general
Sent: Tuesday, December 05, 2000 12:21 PM
Subject: [PHP] session vars not being read?
>
> Hi all, I have a site that allows people to log in and then customizes
> an online lesson for them based on their info in a mySQL database. I am
> using session variables so that I can use these variables in different
> scripts on the site. I have come across one user who simply does not
> seem to be able to work with the session variables, i.e. anything I pull
> from the db and put into session vars doesn't show up when he clicks on
> a link to a script on the site. Does anyone know why this might happen?
> Here is an example of what I mean:
>
> On the main page, I do the following at the top:
>
> <?php
>
> session_start();
>
> if (!$PHPSESSID) {
> session_register('videoid');
>
> } else if (!$videoid){
>
> session_register('videoid');
>
> ?>
>
> Then I get a value from the db and put it into $videoid. When the user
> is on the main page and clicks on a link to another script, at the top
> of the script I have:
>
> <?php
> session_start();
> ?>
>
> And then I try to use $videoid in that script. I have never had a
> problem until now... this one user gets no value in $videoid! So if I
> want to say "Hi user, your video id is 3" where $videoid=3, he actually
> sees "Hi user, your video id is ".
>
> Can someone please help, I'm going insane trying to figure out why this
> would happen to this one person?
>
> Thanks VERY much in advance,
> Omar
>
> --
> 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
>