[nycphp-talk] PHP $_SESSION
anthony wlodarski
anthony at thrillist.com
Thu Jun 5 14:44:45 EDT 2008
Do this to see what's in the $_SESSION variable.
<?php
print "<pre>";
print_r($_SESSION);
print "<pre>";
?>
On Jun 5, 2008, at 2:31 PM, Néstor wrote:
> 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
>
> _______________________________________________
> 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
Anthony Wlodarski
Web Applications Developer
www.thrillist.com
560 Broadway, Suite 308
New York, NY 10012
p 646.274.2435
f 646.557.0803
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20080605/ded34d07/attachment.html>
More information about the talk
mailing list