php get last database id code example
Example: mysql get the last id php
// Insert query
$query = "insert into users(username,fname,lname) values('sonarika','Sonarika','Bhadoria')";
mysqli_query($con,$query);
// Get last insert id
$lastid = mysqli_insert_id($con);