Re: help with form
| From: | Justin French | Date: | Sun, 18 Jan 2004 04:04:42 +0000 |
| Subject: | Re: help with form | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-174950@lists.php.net to get a copy of this message | ||
On Sunday, January 18, 2004, at 01:39 PM, eawilkes wrote:
I'm creating a form that puts data into two different tables in the database. I was wondering how to get the "ID" from the first table and, in the "background", associate it with the second table? any help is GREATLY appreciated!Check out mysql_insert_id() -- there's an example in the manual of how to determine what was the ID of the row you just inserted. http://www.php.net/mysql_insert_id FYI, this page was easy to find searching the PHP manual functions for "mysql id" -- perhaps a timely reminder that you should search the manual before posting a question??? Come back if you need more help after that. Justin French