Re: [PHP4BETA] regarding session_register...
| From: | David Sheckler | Date: | Fri, 10 Dec 1999 17:29:31 +0000 |
| Subject: | Re: [PHP4BETA] regarding session_register... | ||
| References: | 1 2 3 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-7769@lists.php.net to get a copy of this message | ||
Are you calling session_start(); and session_register("var"); before any
http tags? If you're not, it won't work. They must be the first thing
the
browser receives (before and http tags/web page/java script etc...).
Correct me if I'm wrong.
-Dave Sheckler
Hans Rakers wrote:
>
> On Fri, 10 Dec 1999, you wrote:
> > On Fri, 10 Dec 1999, Hans Rakers wrote:
> > >
> > > Hello all,
> > >
> > > Is it normal behaviour that session_register has to be called across various
> > > script files to retreive a value from a session? In other words, is it normal
> > > that after calling session_register in a script, i have to call it again in the
> > > next script to retreive the value of the registered variable again?
> > >
> > > Any help would be greatly appreciated.
> >
> > No, the normal way to start a session is to call session_start() or set
> > session.auto_start = 1 in the config file. session_register() has a side
> > effect of starting a session if it's not started already so that's why
> > it works.
> >
> > -Andrei
> > * We reason deeply, when we forcibly feel. *
>
> Hi,
>
> Thanks for such a quick answer :)
> Anyway, before calling session_register i *do* call session_start.
> The first scriptfile (where i start the session) contains this:
>
> session_start();
> session_name($authrow[authorName]);
> session_register("tekoopUID");
> $tekoopUID=$authrow[authorID];
>
> Now somewhere else in the website i want to pull out the value for 'tekoopUID'
> from the session, but $tekoopUID contains nothing. It does return the
> original value after calling session_register("tekoopUID") again. Or do i have
> to use session_start() again (instead of session_register) at this point to be
> able to retreive the registered variables in the session ?
>
> BTW: Is this mailinglist archived on the web somewhere?
>
> Thanks again,
>
> Hans Rakers
>
> --
> PHP 4.0 Beta Mailing List <http://www.php.net/version4/>
> To unsubscribe, e-mail: php4beta-unsubscribe@lists.php.net
> For additional commands, e-mail: php4beta-help@lists.php.net
> To contact the list administrators, e-mail: php4beta-admin@lists.php.net