Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need help with session variables

Status
Not open for further replies.

ctdapper

Programmer
Feb 13, 2001
22
US
I have written a local intranet program so that users can chech the status of different projects.
I use session variables to keep tract of the project number and the phasecode of the project they are viewing. How ever if there are more then two users then the one that changes the project number that change takes place to anyother users web page.

example first user is looking up project 10 phase 6 and the second user logs on and wants to look up progect 33 phase 3 then users ones project and phase also becomes 33 and 6.

Am I missing something about session variables or is there something wrong somewhere?


Thanks,

Dan
 
D

I can check the sql table an it does make an entry into the table for each session. as far as I can tell.

mode = "SQLServer"
cookieless = "false"
timeout="20"


Dan.
 
WOAH WOAH WOAH!

So you're using sql server to store your session variables?

k, here's what I think may be happeneing then:
- User logs in, accesses project
- record is written to sql server
- Second user logs in, accesses different project
- record is written to sql server
- First user goes to refresh the page
- ***Somehow, your code is getting the last session var
being entered into sql server and assigning that to
the First users session

Thats gotta be whats happening. Have you stepped thorugh your code where it assigns the session var values from sql server, and made sure that its assignign the right values?

D

 
D

I'm such an IDIOT.
Code line 2,562 I have an if statement. That if my data table is not created for the application to create it and to set a couple of session variables. for the first time.
However my bag I did not give an else statement to set those two very important session variables with information from that table. Which would explain why users 2 through (n) could not access the site using session variables but could access using application variables.
However I still do not know why the session variables were over writting in the first place.

Thanks for all the help with this problem.
Everything seems to be working just fine now that I added the else. I don't know how I missed that over and over for the last few days. I just guess that the blinders go on after looking at code nonstop.


Thanks one again for the help.

Dan
 
congrats Dan That'l do donkey, that'l do
[bravo] Mark
If you are unsure of forum etiquette check here faq796-2540
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top