when Wamp (windows+apache+mysql+php) makes a Web site, it is often necessary to use the session record form to log in the user name and password variables, and to clear the session when logout. Usually I want to implement the logout is to prompt the user through alert and then the header jump, but the following code is implemented through JavaScript time countdown and jump to the effect of the homepage, mainly to see the school's BT website and so on is the effect.
PS: Reference C # System Application cookie\session basic knowledge and PHP read cookie\session
The code is as follows:
<?phpsession_start (); Session_destroy (); Empty to create all Sessionsetcookie (Session_name (), ', Time ()-1); $_session = Array ();? >the effect of the implementation is as follows:
finally hope that the article is helpful to everyone, but also try different styles, write short articles.
(by:eastmount 2015-2-21 http://blog.csdn.net/eastmount/)
Php+html to achieve the Logout interface countdown effect