473,326 Members | 2,815 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,326 software developers and data experts.

Question re Session URL re-writing

Hi,

I have developed a website that uses Sessions to manage user
state. It has come to my attention that the users that will be using
this site do not want to enable cookies on their machines. The IT
department is refusing to do it and the individual users do not know
how. We are looking at either emailing howto's out to all the users
along with the already posted instructions that are on the website.
However I was thinking about using URL-rewriting to pass the session_id
instead of relying on cookies. So my question is....

On my site, which is a survey, I don't have links (i.e. hrefs), I
simply call functions when a user answers a question or goes back to
a previous question. For example;

Lets say you answer question 1 the program calls processQ.php,
processQ then works with the answer and, when finished, calls qDisplay()
which is part of a class called Survey.php to display the next question.
There are no links with which to send the session_id on. Is there anyway
to just pass the session_ID as a parameter to the function qDisplay(), for
example qDisplay($SID) or whatever or is using cookies the only way that
I can propagate user sessions?

Sorry for the looooong post. Thanks in advance.

Dave
Jul 17 '05 #1
1 1535
Dave Cooke wrote:
Hi,

I have developed a website that uses Sessions to manage user
state. It has come to my attention that the users that will be using
this site do not want to enable cookies on their machines. The IT
department is refusing to do it and the individual users do not know
how. We are looking at either emailing howto's out to all the users
along with the already posted instructions that are on the website.
However I was thinking about using URL-rewriting to pass the session_id
instead of relying on cookies. So my question is....

On my site, which is a survey, I don't have links (i.e. hrefs), I
simply call functions when a user answers a question or goes back to
a previous question. For example;

Lets say you answer question 1 the program calls processQ.php,
processQ then works with the answer and, when finished, calls qDisplay()
which is part of a class called Survey.php to display the next question.
There are no links with which to send the session_id on. Is there anyway
to just pass the session_ID as a parameter to the function qDisplay(), for
example qDisplay($SID) or whatever or is using cookies the only way that
I can propagate user sessions?

Sorry for the looooong post. Thanks in advance.

Dave


Your functions shouldn't need to know the session id. As long as the SID
is passed to the main script then the session is retrieved and your
functions can use the session contents. If you turn on
session.use_trans_sid then php should do all tis for you.

As a long term fix though your users should at the very least have
cookies turned on even if they're not persistent. Many sites rely on
cookies.
Jul 17 '05 #2

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

Similar topics

9
by: Xizor | last post by:
Let's say I run a server. I have two people using the server. Bill and Joe. Bill is at address.com/bill and Joe is at address.com/joe. Let's say Joe and Bill are both using PHP with sessions on...
2
by: Jason Telisch | last post by:
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...
3
by: Stephanie Stowe | last post by:
I have been out of this group for so long, then 2 questions in one day! Let me give some background on what I am trying to do..... I have an IIS server running ASP apps. I have a Websphere server...
11
by: Stephanie Stowe | last post by:
Hi. I have an ASP page which stores a cookie. That cookie is then read on a different server. This is the crux of an ASP / JSP bridge I am creating for allowing a user to seemlessly switch from an...
4
by: HolaGoogle | last post by:
hi there, i've 2 questions for you guys.... 1: is there any way to "force" a session_onend(), session timeout or at least call my logout method when a user leaves the application window without...
2
by: Chris Puncher | last post by:
Hi. I have a RCW class that was generated by the VS.NET2003 IDE when I added a COM dll reference to my project. This all works fine when I call methods on it. My initial problem is that in...
3
by: Chad Dokmanovich | last post by:
As someone who's had a "fair" amount of web development experience, I shocked that I can't answer this question myself: Q: How does one maintain state and pass data across web pages and do so in...
1
by: Britt | last post by:
Hi, I read that SessionState is on by default. I also read that if it's not required, it must be better off (because of resources) My question is: i don't use session variables (like e.g....
5
by: jehugaleahsa | last post by:
Hello: What is the point of using a DataTable in ASP .NET? We are unsure how you can use them without 1) rebuilding them every postback, or 2) taking up precious memory. We are not sure how to...
4
by: agun | last post by:
Hi guys, Sorry for asking something that maybe already obvious to you all. But since i'm newbie, i just need further explanation. (I've read the PHP Sessions thread written by Atli) In my head,...
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: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
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: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
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....

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.