This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Dreamweaver > March 2005 > Session variable question!





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Session variable question!
CougarTheCat

2005-03-31, 6:26 pm

Hi, I have created an online test. I store the testid and userid in Session
variables at the start of the test. The test could take anyhere from 20 min to
1 hour (the test is in Flash). At the end of the test, the SQL server tables
all get updated with their reponses(via ASP). A couple questions: -what will
happen if more than 1 user logs on to take the test. Will the pages create
unique session variables for each user? -I had the timeout set to 5 minutes and
have since changed it to 40. I also had written a little ASP page to update
the test id and user id to a work table, so if the session variables timed out,
I would still know who was taking the test. Except this won't work if more
than one person should take the test at the same time. Any thoughts would be
greatly appreciated! Thanks!

Jeff North

2005-03-31, 6:26 pm

On Thu, 31 Mar 2005 13:38:19 +0000 (UTC), in macromedia.dreamweaver
"CougarTheCat" <webforumsuser@macromedia.com> wrote:

>| Hi, I have created an online test. I store the testid and userid in Session
>| variables at the start of the test. The test could take anyhere from 20 min to
>| 1 hour (the test is in Flash). At the end of the test, the SQL server tables
>| all get updated with their reponses(via ASP). A couple questions: -what will
>| happen if more than 1 user logs on to take the test. Will the pages create
>| unique session variables for each user?


Yes.

>| -I had the timeout set to 5 minutes and
>| have since changed it to 40.


Once a session times out the session variables are forgotten by the
server. Any attempt to use the same session id will result in a error.
If the new session connection is made then you can not use the 'old'
information.

In your case it would be better to store these variables within the
Flash movie and transmit them when you transmit the results. That way
you'll always have the correct information/data.

>| I also had written a little ASP page to update
>| the test id and user id to a work table, so if the session variables timed out,
>| I would still know who was taking the test.


But when the session times out the user variables that you have set
are gone. Writting to your database will produce incorrect field
values i.e. undefined for both testid and userid.

>| Except this won't work if more
>| than one person should take the test at the same time. Any thoughts would be
>| greatly appreciated! Thanks!


---------------------------------------------------------------
jnorthau@yourpantsyahoo.com.au : Remove your pants to reply
---------------------------------------------------------------
Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews