I need to cause the back forward and reload buttons to end a web login session and redirect the user to a page or an alert to tell them that they are now logged out. I am not sure how to test for the navigation buttons use with HTML.
GraficRegret
0
Junior Poster
Recommended Answers
Jump to PostSessions need some form of server side scripting language to run, and therefore you can't end them with only HTML. What you can do however is have the HTML hyperlink go to a second page, such as a PHP page containing the following:
session_destroy();
What that code would do …
Jump to PostUnfortunately you have no control over the browser, but what you can include at the top of the page is a check such as:
if(isset($_SESSION['SessionName'])){ // Logout Code } else{ die(header('location: LoggedOutPage.html')) }
This shall ask the computer, has the session already been destroyed? If it …
Jump to PostI'm getting confused now, do you want to rephrase your original question just to help me out a bit?
All 10 Replies
Octet
45
Newbie Poster
Featured Poster
GraficRegret
0
Junior Poster
Octet
45
Newbie Poster
Featured Poster
GraficRegret
0
Junior Poster
Octet
45
Newbie Poster
Featured Poster
GraficRegret
0
Junior Poster
Octet
45
Newbie Poster
Featured Poster
GraficRegret
0
Junior Poster
Octet
45
Newbie Poster
Featured Poster
GraficRegret
0
Junior Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.