
Output the last row inserted in MySQLi
MySQLi makes grabbing the last inserted row easy. After running your insert query, you can do this: $id = $mysqli->insert_id; Then, you can query for that row like this: $result = $mysqli->query(“SELECT * FROM table_name