MySQL and PHP
Copyright 1997-2021 the PHP Documentation Group.
mysqli_stmt::$insert_id
mysqli_stmt_insert_id
Get the ID generated from the previous INSERT operation
Object oriented style
int mysqli_stmt->insert_id ;
Procedural style
mixed mysqli_stmt_insert_id(mysqli_stmt stmt);
This function is currently not documented; only its argument list is available.