Jump to content

session_id simple question


redbrad0

Recommended Posts

I have never had the need to use the users session id, but now I am in need and I know this will be a quick and basic question.

 

If I write the session_id onto the webpage, the number changes all the time (when cookies are disabled). Shouldn't this number always stay the same?

 

echo session_id();

Link to comment
https://forums.phpfreaks.com/topic/114564-session_id-simple-question/
Share on other sites

The user must provide the session ID. There is no way for the server to track the user. Normally, the session ID is set in a cookie. If you're really against this, you can set PHP to pass the ID around in the URL or in hidden fields. This is not without its own set of problems, however.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.