Re: noob need help for sessions

From: Date: Thu, 07 Apr 2005 22:16:55 +0000
Subject: Re: noob need help for sessions
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-212595@lists.php.net to get a copy of this message
Jeff Weinberger wrote:
I am well warned about the dangers of passing session IDs in URLs, but for my purposes, there is no sensitive data in the session, and I want to be able to do it only in the case where the visitor does not accept cookies.
Better for you to be warned :-)session_start();
session_register("abc"); $abc = "Test Session String"; Replace it with $_SESSION['abc'] = 'The Session String';
page2.php: print $abc;
That will work only with register_globals set to TRUE, so better replace it with print($_SERVER['abc']); I also suggest you to take a look here [ http://www.php.net/session ] and here [ http://www.php.net/session ]. Hope this helps, -- Josip Dzolonga http://josip.dotgeek.org jdzolonga[at]gmail.com

« previous php.general (#212595) next »