Re: Sessions in Functions
| From: | Jordan Elver | Date: | Fri, 16 Mar 2001 11:45:38 +0000 |
| Subject: | Re: Sessions in Functions | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-44254@lists.php.net to get a copy of this message | ||
Hi,
Yep I do. I just figured out that it was because I had session_start() inside
another function ;-)
Thanks anyway,
Jord
On Friday 16 March 2001 10:43, you wrote:
> > Did you declare $LOGGED_IN as a global variable in your function?
>
> e.g.
>
> global $LOGGED_IN;
>
>
> _____
>
> ~ Richard Allsebrook ~
> Applications Developer and Webmaster
> Easysoft Limited, Thorp Arch Grange, Thorp Arch, Wetherby, LS23 7BA, UK
> http://www.easysoft.com
> <http://www.easysoft.com> -
> http://www.cinema.com
> <http://www.cinema.com>
> "A computer lets you make more mistakes faster than any invention in
> human history - with the possible exceptions of handguns and tequila."
>
> _____
>
>
>
>
>
> -----Original Message-----
> From: jjelver [mailto:jjelver@worldsites.net]
> Sent: Friday, March 16, 2001 10:41 AM
> To: php-db
> Cc: jjelver
> Subject: FW: [PHP-DB] Sessions in Functions
>
>
> Hi,
> I have some code which I decided to make into a function. Some of the
> code
> updates a session var which holds the current time. It now does not
> work.
>
> // update session variable with new time
> session_register("LOGGED_IN['time']");
> $LOGGED_IN['time'] = mktime();
>
> Are there issues that I should be aware of when I use sessions like
> this?
>
> Thanks,
>
> Jord
----------------------------------------
Content-Type: application/rtf; charset="ISO-8859-1"; name="Attachment: 1"
Content-Transfer-Encoding: base64
Content-Description:
----------------------------------------
----------------------------------------
Content-Type: application/ms-tnef; charset="ISO-8859-1"; name="Attachment: 2"
Content-Transfer-Encoding: base64
Content-Description:
----------------------------------------