I created a login form in php which inserts user name and datetime into a login table in mysql.
However, I can only get the information to be captured in the table once. The user can login successfully more than one time, but the record of the login is not stored more than once. Below is the code I am using. Can anyone explain the problem? I am very new to php.
$sql="INSERT IGNORE INTO logintimes(user_name,datetime)VALUES('$_POST[fuser_name]', now())";
$result=mysqli_query($cxn,$sql) or die(mysqli_error($cxn));
$_SESSION['auth']="yes";
$_SESSION['logname'] = $_POST['fuser_name'];
include("storedlog.inc");