hi there. please help me on this. Am working on a website. On one page i put a login form that will authenticate an administrator. However am trying to find a way that when the administrator logs off, no one can be able to press the back or forward button on the browser and get to the page. Am trying to find a wat through the

session_start()

function. Please help. Thanks.

Recommended Answers

All 2 Replies

Kill the session, than when the person clicks the back button it will run through the authentication process again and note that the person no longer has the required season to access the page.

session_destroy()

http://ca.php.net/session_destroy

Yes, this function works well.
PHP.net also recommends using
unset($_SESSION); which will wipe the $_SESSION array too.

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.