PHP Global Variables

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
rkellybis
Forum Newbie
Posts: 3
Joined: Wed Jan 29, 2003 5:26 am
Location: cork

PHP Global Variables

Post 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!
User avatar
DaZZleD
Forum Commoner
Posts: 38
Joined: Tue Jan 07, 2003 5:39 am

Post 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.
Post Reply