get last inserted in core php code example Example: get last inserted id in php Example (MySQLi Procedural) $last_id = mysqli_insert_id($conn);