I am trying to update a value into my table with the last ID, but I can not get mysql_insert_id() working. Can someone help me (I am a beginner with PHP). Thanks in advance!
This is a piece of my code, I know that mysql is outdated but I am doing this as a school project:
$tijd = date("H:i:s");
$userid = mysql_insert_id();
$query = "UPDATE tijden SET tijduit = '$tijd' WHERE id = '$userid'";
$resultaat = mysql_query($query);
unset($_SESSION['inchecken']);