how to pass user info to diffrent pages using sessions?

Joined
Jun 30, 2005
Messages
59
Reaction score
0
Hi all i wonder how i can pass user information such as login name to diffrent pages using sessions. My intention is that i want in diffrent pages the php pages automatically knows who is using the page and where user log name is necessary it is avaliable by just doing echo $username or using $username in queries.Furthermore, i want the sessions some how expire within 15 min or so.I be happy if an expert show me how i can create sessions and how to use it in php pages for above purpuse. Thanks
 
Your best bet may be to use a CMS (content management system) for PHP unless you need to code this yourself for a unique purpose. www.phpnuke.com and www.mamboserver.com are common ones :)

To store user data you will need to use cookies ideally (or PHP session strings, but I'd advise against this). I've not done anything like this before, but I'm sure you you search for a PHP cookie tutorial in google you'll have some good source code examples to work through :)
 
Back
Top