php

Get last insert id in db using PHP

<?php
    $last_id = $conn->insert_id;
?>

Get last inserted id in the database using PHP if you have created a connection using MySqli.

Was this helpful?