Page 1 of 1

search table database for unique id

Posted: Mon Jul 26, 2010 11:25 pm
by JonathanStanton
Alright so this is a multi -step process:

(1) User creates new Real Estate Listing by filling out a form (Add.php)
(2) User submits Listing to database table 'listing' and Advances to next page (upload.php)
(3) User uploads images which are stored in 'upload_images' table which is linked to 'listing' table via targeting the listings unique id.
-----
Question: When I advance to my next page what's the best way to get unique_id of the listing I just posted?

Re: search table database for unique id

Posted: Tue Jul 27, 2010 1:13 am
by cpetercarter
Have a look at mysql_insert_id().