Script Cleanup

i got an insert script that inserts code into one table retrieves the primary key and inserts that and data into the second table. Quick question how do i clean up my code so it works a bit better cos its sloppy and uses none of the best practise methods...

Code:

View Replies


ADVERTISEMENT

Session State Cleanup

We have an ASP site that uses a MySQL db backend. Usename/Password authentication is stored in db tables. We are currently using session variables as a means for validation when the user navigates to new pages. Generally speaking, all this does and has worked fine

The issue is with abandoned sessions. For instance..

Joe user clicks the [X] in the upper right hand container, closing out IE or firefox. IIS will not terminate the session for ~ 20minutes(default), leaving these resources unavaliable.

In our situation, (and possibly a different issue) unless the user clicks the [EXIT] button we've provided, not only does the session persist for 20 minutes, the login state saved in the MySQL table stays locked. Before the User can log back in, they need to call us to reset their state.

I'm looking for some kind of solution to address a user exiting the application abnormally. I am not sure of the correct procedural methodology, but I would think that some kind of process or event trigger would run in the background looking to cleanup stale sessions. Code:

View Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved