Getting the Last Inserted ID in MySQL Table using PHP
In this tutorial, I'm going to show you how to get the last inserted id in our database table. In this tutorial, I have set up an Insert Form to show the id that will be inserted in our MySQL database. I've included 2 mysqli methods in this tutorial in the comments. So, feel free to switch between the two. Creating our Database First, we're going to create a database that contains our data. 1