Page 1 of 1

[SOLVED] Returning row number from a row that was just in...

Posted: Mon May 28, 2007 5:37 pm
by plezops
I am trying to return the information from a database after a user submits something. The information is validated and the info is inserted into a database, this all works fine but I would like to know which row the information was placed in so that I can use that info to display on the submit results page.

Thanks in advanced

Posted: Mon May 28, 2007 6:03 pm
by John Cartwright
mysql_insert_id() will give you the id of the last inserted row.

Posted: Mon May 28, 2007 6:08 pm
by plezops
Cool that works! Thanks.