How can I add the current date and time to a specific row within the database. I'm working on a project that stores the date and time of when the user last logged online.
I've currently got
$date = date('Y-m-d H:i:s');
$query = "UPDATE Login SET Last Logged='$date' WHERE Email='$email'";
$results = mysqli_query($conn, $query);
It current stores 0000-00-00
.
Is this along the right lines? or have I gone on off the beaten track?
I've look for other questions asked, but couldn't see any that may answer this.