We can see that a small number of websites will display the last time you log on after the user logs on. There are many implementation techniques to achieve this php login display method of the user's last login time, if you directly use database records or directly use phpcookie records, the following is my... we can see that a small number of websites will display the last time you log on after the user logs on. There are many implementation techniques to achieve this php login display method of the user's last login time, if you directly use the database record or directly use the php cookie record, we will introduce how to use the cookie to record the user's last login.
Create the script file form_login.php. the code is as follows:
User logon
"; Echo 'Your last logon time is: '. $ _ COOKIE ['login _ right']; echo"";} Email login
Create the script file login_time.php with the following code:
Create the script file login_in.php with the following code:
"; Echo" logout return ";
Supplement: it would be better for the database because the cookie is not downloaded once the user clears the cookie.
Article link:
Save this article for favorites!