session ID question

This is a discussion on session ID question within the PHP Language forums, part of the PHP Programming Forums category; Hi, Is there a session ID that exists when you start a session on a PHP page? I have noticed ...


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 09-06-2004
mr_burns
 
Posts: n/a
Default session ID question

Hi,

Is there a session ID that exists when you start a session on a PHP
page? I have noticed that it sometimes is passed in the URL. How do I
get this session ID even if it doesnt exist in the URL? Cheers

Burnsy
Reply With Quote
  #2 (permalink)  
Old 09-06-2004
Steven Stern
 
Posts: n/a
Default Re: session ID question

On 6 Sep 2004 05:03:45 -0700 (more or less), bissatch@yahoo.co.uk (mr_burns)
wrote:

>Hi,
>
>Is there a session ID that exists when you start a session on a PHP
>page? I have noticed that it sometimes is passed in the URL. How do I
>get this session ID even if it doesnt exist in the URL? Cheers
>
>Burnsy


A session is created only if you create one.

To see the contents of a session,

session_start();
print("<pre>");
echo "Session ID: ",session_id(),"\n";
print_r($_SESSION);
print("<pre>");

see http://www.php.net/manual/en/function.session-id.php
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 10:15 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0