mysqli login log
I would like to keep a log of login attempts. Where is the best way to know of when a user has attempted to login and store it before the redirect.
thank,s
I would like to keep a log of login attempts. Where is the best way to know of when a user has attempted to login and store it before the redirect.
thank,s
add an insert record behavior to the login page, make sure that the insert code comes before the login code.
how would i know the status of the login, whether it was successful or not?
in the user log table, have a column for the username, and a column for the password.
store the login username and password using the insert record behavior.
on the page where you view the login attempts, you can then use a join query to join the log table to the users table on the username column, and in the select statement, compare the password from the log table to the password from the users table:
SELECT login_log.UserPassword = users.UserPassword as loginStatus, users.UserEmail
FROM login_log
INNER JOIN users ON
login_log.UserEmail = users.UserEmail
in this example, if the password for the 2 table matches, loginStatus will be 1, or 0 if they don't match.
NOTE, the above SQL is an example only and will need to be modified to match your table and column names.
Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.
These out-of-the-box solutions provide you proven, tested applications that can be up and running now. Build a store, a gallery, or a web-based email solution.