Hello.
I have a problem with closing a session and moving to the regular page.
The process is between 3 ASP pages:
(1)References.asp (2)SignIn1.asp (3)SignIn2.asp
the first page is a form that contains the references to the pages in the site. it contains the sign in button.
the action of the form redirects it to the second page which checks if the user is in the database and if the user is in database it redirects it to the third page and sets the session "SignedIn" to true.
the third page is a copy of the first page with few changes, such as the sign out button. the action of this page is redirecting it to the first page after the sign out button is pressed and sets the session "SignedIn" to false.
as you can see there is a loop between those three pages.
the problem is: when i click the sign out button in the third page it works good and redirects to the first page. but when i click on a reference after signing out, it redirects me to the third page again and shows that the user is signed in.
one more thing, in the first page there is a condition that checks if the user exists or not. if the user is not in the database it set's the session "SignedIn"
to false, and shows a massege. the "else" says that if user exists it set's the session "SignedIn" to true and redirects to the second page.
now to the point - when i press the sign out button it is working properly (but not if i press other references after signing out). now if i enter an invalid user name or password it shows me the massege. after that the problem is solved and the site is working normally. because of that i think the problem is in the session and that i need to learn how and where to close it.