youngbuc Posted July 7, 2004 Share Posted July 7, 2004 i have a db with 4 tables. -main -customers -power -connections i am trying to create a form that inserts data into the "main" and "customer" tables. in the MAIN table, the cust_id is set to auto increment. i would like to my form to send the "cust_id" that was just created to the next step of the form or just add it to the next table. 1st form would have 4 fields from the table "main" - cust_id, tenant, environment, and size. cust_id would be set to 0 or null, then when they submit, it would send them to the second form that has fields from "customers" - cust_id (this is where i want to find out what the cust_id was created for the first table),contact, phone, fax and so on. any help would be great. Quote Link to comment https://forums.phpfreaks.com/topic/1893-mysql_insert_id/ Share on other sites More sharing options...
morpheus.100 Posted July 20, 2004 Share Posted July 20, 2004 You will need to hand code this as dreamweaver lacks abillity to insert code to grab lastinserted id. mySQL websitehas relevant info on last id, and the rest you can pass as parameters. Quote Link to comment https://forums.phpfreaks.com/topic/1893-mysql_insert_id/#findComment-6184 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.