Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Session problem

Status
Not open for further replies.

jdaniels

Technical User
Apr 23, 2002
63
0
0
GB
Hi,

I am using PHP4 on Win2000 with IIS and am unable to retrieve session variables. I can set them with:

$_SESSION['key'] = $val;

This sets the value in the session file but I cannot retrieve this value if, for example, I use this in another subsequent page:

$thisVal = $_SESSION['key'];

Instead I am presented with the following error:

Notice: Undefined variable: _SESSION in c:\inetpub\ on line x

Do I need to configure something in php.ini, or elsewhere?

Thanks,

Jon Daniels
 
I wasn't invoking 'session_start()' - and that was the problem! Thanks for your help :)

Jon Daniels
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top