I forgot to mention that I can see the session files "sess_randomnumber" in the save.session_path file, but all those session files contain nothing (0 K). So does this tell anything at all?
----- Original Message ----- From: "Dale Heil" <[EMAIL PROTECTED]> To: "'Bossanova'" <[EMAIL PROTECTED]> Sent: Friday, March 29, 2002 10:02 AM Subject: RE: [PHP-WIN] HELP: USING $_SESSION instead of session_register() > make sure in php.ini for session.save_path you have a > hard drive path like c:\tmp instead of \tmp as shown. > there's a note for windows users right above the setting. > > -----Original Message----- > From: Bossanova [mailto:[EMAIL PROTECTED]] > Sent: Friday, March 29, 2002 12:44 PM > To: Pac mon; [EMAIL PROTECTED] > Subject: Re: [PHP-WIN] HELP: USING $_SESSION instead of > session_register() > > > I've tried your suggestion, and I didn't see anything but a blank page here, > although I see the session ID is passed automatically using PHPSESSID (URL > below). Is there something in php.ini that I have to modify to get this to > work? BTW, I'm running Apache 1.3.23 on Windows 2000 if that would make any > difference. Thanks. > > http://localhost/reg_2.php?PHPSESSID=1b18cbc3eb64a63b4cd947f6c58201b8 > > > > > ----- Original Message ----- > From: "Pac mon" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]> > Sent: Thursday, March 28, 2002 10:15 PM > Subject: Re: [PHP-WIN] HELP: USING $_SESSION instead of session_register() > > > > Not quite... Here's something that ought to work better for you: > > > > ----page1------ > > <? > > session_start(); > > if (!isset($_SESSION['foo'])) { > > $_SESSION['foo'] = "test foo"; > > } > > > > ?> > > <body> > > <? echo $_SESSION['foo'] . "<br>"; > > echo session_id() . "<br>"; > > > > echo "<br><br>"; > > ?> > > <a href="reg_2.php">reg_2.php</a> > > </body> > > > > ----page2-------- > > <? > > session_start(); > > ?> > > <body> > > <? print $_SESSION['foo']."<br>"; ?> > > </body> > > > > > > > > > > > > > > ----Original Message Follows---- > > From: "Bossanova" <[EMAIL PROTECTED]> > > To: <[EMAIL PROTECTED]> > > Subject: [PHP-WIN] HELP: USING $_SESSION instead of session_register() > > Date: Thu, 28 Mar 2002 13:06:55 -0800 > > > > Pardon my ignorance, I've been searching for answers for this new > $_SESSION to work to no avail. If someone can help me out by giving examples > how I can pass the session_id to the next page and access the same > $_SESSION["var"] on that page, it would be very helpful. > > > > My question is, once I set this on the 1st page: > > <? > > session_start(); > > if (!isset($_SESSION["foo"])) { > > $_SESSION["foo"] = "test foo"; > > } > > > > ?> > > <body> > > <? echo $_SESSION["foo"] . "<br>"; > > echo session_id() . "<br>"; > > > > echo "<br><br>"; > > ?> > > <a href="reg_2.php?id="<? session_id(); ?>">reg_2.php</a> > > </body> > > > > > > How do I set up link to the next page, and what should I put on the next > page? Will this be correct? > > > > <? > > session_id($_GET["PHPSESSID"]); > > session_start(); > > ?> > > <body> > > <? print $_SESSION["foo"]."<br>"; ?> > > </body> > > > > > > But I got this error message: > > > > Warning: Undefined index: foo in c:\phps\reg_2.php on line 6 > > > > I'm new to PHP so this is also a major factor of the failure. Again, > thanks for your help. > > > > > > > > Burhan > > > > > > greg wrote: > > ------------------------------- > > Use of $_SESSION (or $HTTP_SESSION_VARS with PHP 4.0.6 or less) is > recommended for security and code readablity. With $_SESSION or > $HTTP_SESSION_VARS, there is no need to use > session_register()/session_unregister()/session_is_registered() functions. > Users can access session variable like a normal variable. > > > > http://www.php.net/manual/en/ref.session.php > > > > > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php