473,320 Members | 1,699 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Quick Session Question

I read and reread the PHP manual about sessions, and I have a quick
question. What causes the session id to change? I tried destroying the
session and unsetting the session vars, but it maintains the same id.

Just so you know, I don't need to make the session id change for any
reason. I'd just like to know what to avoid since I'm going to be storing
data the user enters with their sessionid and I'd like to make sure that
they can still access it through their entire visit.
Jul 16 '05 #1
2 3243
Jason Telisch wrote:
I read and reread the PHP manual about sessions, and I have a quick
question. What causes the session id to change? I tried destroying the
session and unsetting the session vars, but it maintains the same id.

Just so you know, I don't need to make the session id change for any
reason. I'd just like to know what to avoid since I'm going to be storing
data the user enters with their sessionid and I'd like to make sure that
they can still access it through their entire visit.


The session id shouldn't change. It's randomly generated when the user
enters your website and is then passed back by the browser using cookies
or as part of the url on each subsequent request. This id is then used
as the key to the session variables.

Destroying the session variables simply destroys the contents of the
session. The id and the empty session will continue to exist.

Jul 16 '05 #2
Kevin Thorpe wrote:
Jason Telisch wrote:
I read and reread the PHP manual about sessions, and I have a quick
question. What causes the session id to change? I tried destroying
the session and unsetting the session vars, but it maintains the same id.

Just so you know, I don't need to make the session id change for any
reason. I'd just like to know what to avoid since I'm going to be
storing data the user enters with their sessionid and I'd like to make
sure that they can still access it through their entire visit.

The session id shouldn't change. It's randomly generated when the user
enters your website and is then passed back by the browser using cookies
or as part of the url on each subsequent request. This id is then used
as the key to the session variables.

Destroying the session variables simply destroys the contents of the
session. The id and the empty session will continue to exist.


So, when the client deletes the cookie, the session id will be lost. If
the client continues to visit the site, he will receive a new cookie
with a new session id.

Jul 16 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Reply-Via-Newsgroup Thanks | last post by:
Folks, I consider myself a reasonably strong PHP programmer, but I've not used sessions before (I've used cookies instead) and I'd appreciate it if someone could confirm something for me. ...
1
by: YT | last post by:
Couple of quick ASP (3.0) Cookie questions: 1/ I'm using a cookie in my asp script to place cookies (within a key) so my code looks like: Response.Cookies( "quoteform" )( "name" ) = Session(...
3
by: Greg Scharlemann | last post by:
Does the redirect statement: header(Location:"http://www.newpage.com"); need to come before certain statements? I've setup a login page and try to redirect a user once they have logged in...
10
by: tshad | last post by:
I have been using the default session state (InProc) and have found that I have been loosing my information after a period of time (normally 20 minutes). Is there anyway to find out how much...
8
by: KMZ_state | last post by:
We have a question here where a developer says that if the same user starts 2 instances of the application on his machine, the session variables may get mixed up b/c the session is PER IP ADDRESS. ...
6
by: encoad | last post by:
Hi everyone, I'm new to C# and I am building website which allows users to fill out various forms. All is going well, however I'm having a bit of trouble with one particular issue. The main...
4
by: PokerMan | last post by:
Hi In a session key add such as: Session.Add("CustId", userId); if i then called that again so say i did this
2
by: DLN | last post by:
Hello all, I apologize for the naivety of this question, but I'm wondering whether session variables can ever be modified (somehow) by a client without having to go through code that I write. ...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.