php - Get last login details -


I have developed the login system. It works perfectly now I have to get the last login date and time and display it To do. The display part is fine. In logging in successfully, I tried this code to update the log-in field in DB.

from $ query = "SELECT * where email = '$ email' and passwordR = ​​'$ password' and status = '1' '; $ result = mysqli_query ($ con, $ Quote] $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ $ _ $ $ $ ; $ Sql ​​= "User SET log time = now ()" update; Mysqli_query ($ con, $ query) or die (mysqli_error ($ con));}

and My logout line is defined as below,

  timestamp of `log time` is not CURRENT_TIMESTAMP tap on update CURRENT_TIMESTAMP,   

The log time has never been updated. Why

  $ sql = "User Set Log Time = Now ()" Update;  

Not possible?

This should do the trick.

  $ sql = "User set log time = now () where email = '$ email' and password = '$ password' and status = '1'";  

Comments

Popular posts from this blog

apache - 504 Gateway Time-out The server didn't respond in time. How to fix it? -

c# - .net WebSocket: CloseOutputAsync vs CloseAsync -

c++ - How to properly scale qgroupbox title with stylesheet for high resolution display? -