Page 1 of 1

last mysql transaction...

Posted: Fri Apr 14, 2006 4:11 pm
by silent assassin
Hey guys, here's my problem. Not a big one, but for some reason, I just can't wrap my head around it.

I'm doing a customer database, and after inputting their data, I need to have a link on the page that lets me do something with their data. Here's the case in point.


I get their name, addres, etc, etc, on a page, and they submit the form. The page they submit the form to throws their information into a database, and then renders a page that says, hey, thanks for entering your information, would you like to click on LINK to modify your information?

So, to make the link work, I need the id (primary index, key field value) of the data insert I just did. Can anyone tell me how to get that information without comparing the actual data? (eg, name, address, etc, etc)

Posted: Fri Apr 14, 2006 4:17 pm
by feyd
unless concurrency issues arrise, mysql_insert_id() can be used.