TalkPHP

TalkPHP (http://www.talkphp.com/forums.php)
-   General (http://www.talkphp.com/general/)
-   -   Php sessions? (http://www.talkphp.com/general/1896-php-sessions.html)

Edwin 01-08-2008 01:26 PM

Php sessions?
 
Where can i find the code for this i been looking around for a while now anyone knows? im sorry if im not suppose to do this here.

Wildhoney 01-08-2008 01:38 PM

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'];

RobertK 01-08-2008 01:40 PM

Here you go: PHP: Sessions - Manual

The PHP online manual is a great thing to browse when you're lost, it has good categorization of functions and objects.


All times are GMT. The time now is 08:24 PM.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0