Here's an example: Page1:
session_start(); $_SESSION['foo'] = bar; Page2: session_start(); print $_SESSION['foo']; Page 2 should print 'bar'. -Dash -----Original Message----- From: Matt Babineau [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 10, 2002 11:34 AM To: 'Dash McElroy'; 'PHP Windows' Subject: RE: [PHP-WIN] SESSION vars Well once the session var has been set using the previously posted methos I can accress like $_SESSION['foo']. Should I be able to simply do this: Session_start(); $_SESSION['foo'] = "xyz"; ? Matt Babineau MCWD / CCFD ----------------------------------------- e: [EMAIL PROTECTED] p: 603.943.4237 w: http://www.criticalcode.com PO BOX 601 Manchester, NH 03105 -----Original Message----- From: Dash McElroy [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 10, 2002 2:15 PM To: 'Matt Babineau' Subject: RE: [PHP-WIN] SESSION vars Have you started the session on the second page? When I read the 4.1.0 release announcement, it said that calling a variable with $_SESSION['blah'] will register the variable, no need to do a session_register(). -Dash -----Original Message----- From: Matt Babineau [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 10, 2002 10:57 AM To: 'PHP Windows' Subject: [PHP-WIN] SESSION vars I was reading on php.net but it seem unclear to me how to properly set a session variable. my code looks like this: session_start(); $_SESSION["logged_in"] = "1"; ---------------------------------- when I click the link to the next page, and it checks for the logged_in session var it cannot find it. am I setting it improperly? do I need to use: session_register("logged_in"); Thanks, Matt Babineau MCWD / CCFD ----------------------------------------- e: <mailto:[EMAIL PROTECTED]> [EMAIL PROTECTED] p: 603.943.4237 w: <http://www.criticalcode.com/> http://www.criticalcode.com PO BOX 601 Manchester, NH 03105 -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php