NYCPHP Meetup

NYPHP.org

[nycphp-talk] PHP $_SESSION

Néstor rotsen at gmail.com
Thu Jun 5 14:31:46 EDT 2008


yes

On Thu, Jun 5, 2008 at 11:15 AM, Tim Sailer <sailer at bnl.gov> wrote:

> On Thu, Jun 05, 2008 at 11:05:35AM -0700, Néstor wrote:
> > To answer the last 3 postings
> >
> > I get the session_id() and save it in $_SESSION['mysession']
> > then in every page I compare them if not the same then I send the user
> back
> > to
> > the login page:
> >   if($_SESSION['mysession'] != session_id() ){
> >      // redirect to the HR admin page
> >      header("Location:/login.php");
> >   }
> >
> > The redirect works!!!
> >
> > YES!    $_SESSION['mysession'] is empty,  the session information is
> > disappearing
> > from one page to the other.
>
> Are you doing a session_start()?
>
> Tim
> _______________________________________________
> New York PHP Community Talk Mailing List
> http://lists.nyphp.org/mailman/listinfo/talk
>
> NYPHPCon 2006 Presentations Online
> http://www.nyphpcon.com
>
> Show Your Participation in New York PHP
> http://www.nyphp.org/show_participation.php
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20080605/451c7820/attachment.html>


More information about the talk mailing list