NYCPHP Meetup

[nycphp-talk] sessions class

Ophir Prusak ophir at prusak.com
Thu Mar 13 14:37:23 EST 2003


----- Original Message -----
From: "Shawn Lawyer" <shawn at shawnlawyer.com>
To: "NYPHP Talk" <talk at nyphp.org>
Sent: Thursday, March 13, 2003 2:30 PM
Subject: [nycphp-talk] sessions class


> here we go,
> I have a class that is to be handling my sessions for me, allowing me to
store sessions in a db
> without the ini file doing int for me.basically I check to see if the
session id is available in a cookie,
> get ,or post variable. then if it is I check the database against the id
variable if it finds the variable
> in the db it's a valid session. if the script doesn't find the id in the
db then a new id is created. here
> where the problem is. for some reason the id in the cookie isn't found in
the db so the script creates
> a new id and puts it in the db and starts a session with the new id.

Why don't you re-write the cookie with the new ID at this point ?

> when I go to refresh the page
> the old cookie id is found and so instead of using the session that was
started on the previous
> page the script just creates a new one. I need to unset this cookie I
think but not sure.
> thank you,
> shawn.
>
>
>
> --- Unsubscribe at http://nyphp.org/list/ ---
>
>
>





More information about the talk mailing list