Page 1 of 1

PHP Global Variables

Posted: Wed Jan 29, 2003 5:26 am
by rkellybis
I am trying to create a variable when a user logs in to my site that will be available on every subsequent page. The main reason for this is that when a user logs in he/she will be able to add details to a database and i need to add their username aswell. I already have session variables set up if these can be used in some way. Appreciate the help!

Posted: Wed Jan 29, 2003 7:12 am
by DaZZleD
you need to create a new session, register the needed variables and then make sure you open the session on every subsequent page in order to have access to the set variables. also make sure you use the correct session name or id.