I'm having problems with sessions.
I have a tutorial that advises me to use session_register() at the top of my page,to declare a session variable. but the variable is not held.
I have globals off in php.ini and have been advised to try $_SESSION['var'] still no persistant variable.
I use win and have set php.ini sesion.save to c:\windows\temp as instructed.
Has anyone got a simple example of setting and using a session variable so I can check that it's my setup and not my syntax?
Or any advice/help would be great
Thanks
Gav
$_SESSION[];
Moderator: General Moderators
here you go:
http://www.devnetwork.net/forums/viewto ... =7873#7873
That topic has a simple session script for you to test out
http://www.devnetwork.net/forums/viewto ... =7873#7873
That topic has a simple session script for you to test out
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
session_register() cannot be used with register_globals off. Do you have session_start() at the top of all pages that set or utilise session variables?
http://www.php.net/manual/en/ref.session.php
http://www.php.net/manual/en/function.session-start.php
Mac
http://www.php.net/manual/en/ref.session.php
http://www.php.net/manual/en/function.session-start.php
Mac