Thread: Php sessions?
View Single Post
Old 01-08-2008, 01:38 PM   #2 (permalink)
Wildhoney
La Vida es Sueño
Advanced Programmer Top Contributor 
 
Wildhoney's Avatar
 
Join Date: Sep 2007
Location: Oldham
Posts: 2,280
Thanks: 90
Wildhoney is on a distinguished road
Default

There's no need to apologise ! We have an article on the life of a session, however, if you'd care to elaborate on your question then maybe we could assist you more? From what I gather though you're just looking to set up a basic session?

php Code:
session_start();

$_SESSION['username'] = 'Wildhoney';

Then as long as you're on the same website, with the same session ID, you can access $_SESSION['username'] as long as you place session_start() above it:

php Code:
session_start();

echo $_SESSION['username'];
__________________
The man who comes back through the Door in the Wall will never be quite the same as the man who went out.
Send a message via AIM to Wildhoney Send a message via MSN to Wildhoney Send a message via Yahoo to Wildhoney
Wildhoney is offline  
Reply With Quote