Basicly a session cookie contains the id by which the server knows its you.
Say the session id is 1.
Now, this session id is stored on your computer in a cookie.
When you get the next page and call session_start() it checks to see if your $_COOKIE contains a session id.
With cookies turned on:
session_start(); //Check to see if PHPSESSID exist, else send ookie to browser and initate a new session with random id, PHPSESSID cookie set to ABCDEFG(The session id)
$_SESSION["aValue"]="Iam loged on";
Next page:
session_start(); Check to see if PHPSESSID exist, else send cookie to browser and initate a new session with random id., Wow, PHPSESSID exist so we continue upon the session identifed by ABCDEFG(the value set before)
print $_SESSION["aValue"]; //Display Iam loged on.
Now we have a browser where cookies are turned off.
session_start(); //Check to see if PHPSESSID exist, else send ookie to browser and initate a new session with random id, PHPSESSID cookie set to ABCDEFG(The session id) BUT!!! The cookie is not saved on the local system since cookies are turned off.
Next page:
session_start(); //Now, the it checks, but dosent find a cookie with PHPSESSID stored and thus assumes its a new session being started and thus:
print $_SESSION["aValue"]; //Displays nothing.
The default in php's config is to use cookies for session handling.
But there is also possible there to set it to use a GET instead of cookies.
If you search this forum you will find many threads concerning sessions, so go and read them since I'am at best a wimsy teacher. Hope I helped a little.