Re: noob need help for sessions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux