By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,890 Members | 1,048 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,890 IT Pros & Developers. It's quick & easy.

Not sure how to approach

P: 67
I have a form on one page where a user enters info and submits. When submited the data is stored in a mysql table and given an id. The user is then taken to a new page and asked to upload an image. I need the image to have a ref # that is the same as the id from their submission.

Basically i need to find out the id that was given to their submission.

Thanks in advance for any help.
May 10 '07 #1
Share this Question
Share on Google+
1 Reply


Atli
Expert 5K+
P: 5,058
If the ID column is an AUTO_INCREMENT column, you can use the mysql_insert_id() function to retreive the ID given to the last row that was inserted.
May 10 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.