javascript - Log out restriction in php -


i making website using javascript , php.

when user logout website , if clicks button of browser goes previous state in user logged in.

1. how can restrict this?

2. can done sessions, or else?

use sessions

login.php:

... $_session["foo"] = $foo; ... 

logout.php:

... unset($_session["foo"]); ... 

in login.php set sessionvariable named foo (so user logged on). when logs out, destroy/unset sessionvariable named foo, in each logged in page may want if statement checking if session variable set(logged in) else (not logged in) can redirect user ever want to.


Comments

Popular posts from this blog

html - height not adding height to a empty div -

Oracle SQL. How to select specific IDs where value of columns specify criteria? -

python - Robot Framework location and name of keyword -