I have a basic knowledge of PHP and I am trying to make a check in and out system by adding a check in time and check out time to a database.
Check in:
session_start();
$_SESSION ['inchecken'] = true;
$tijd = date("H:i:s");
$query = "INSERT INTO tijden(tijdin) VALUES('$tijd')";
$resultaat = mysql_query($query);
Check out:
$tijd = date("H:i:s");
$query = "INSERT INTO tijden(tijduit) VALUES('$tijd')";
$resultaat = mysql_query($query);
unset($session['inchecken']);
The problem is that the check in time and check out time are both saved to a new id in my database (auto increment). Is there someone who can tell me how to add both the check in and check out time in the same database id? Thanks in advance!