carefreespirit wrote in php

Retrieving id

I have been trying to figure out what exactly I need to look up to get info on how to do the following, but I'm not quite sure what it is I am looking for:

I have a registration form that needs completed and the data input into the database and then the assigned ID which is auto-increment and unique to be retrieved to be carried over to another page so that I don't have to pass so many variables through. I know how to input the data into the database, but how can I get the correct id? The data that is being input in could be duplicate information and I need to be sure that I have the correct id to pass on. I thought there was a way that I could immediately retrieve a variable from the last input row right after doing the insert, but I can't remember the name of the function to do that.

Anyone know of what I can lookup on php.net to accomplish this or have any ideas for helping me out? It would be greatly appreciated! Thanks!