Possible Duplicate:
How to get the id of a row i've just inserted php/mysql
I have a form with the fields:
- Name
- City
- State
- Zip
and the user fills in with valid data... its sent to a (php) script and INSERTed into the db.
Is it possible to grab the auto-incrementing PK id WHEN submitted? E.g. say the PK id for that data I entered is '6' . How do I get this PK value programmatically (via php) upon submission? (Without having to call the last PK ID via SQL ? ) or is via SQL the only way?