Good day all, is it possible to link two tables with a generated userID when submitting registration information, say there are two sections in the form table 1= P details table 2 = L details i want to first insert the information into table 1 with a generated ID, then use the generated ID to insert data into table 2, any advice many thanks tldmic
If I understood you right, try this " insert into table1 values('', 'value1', 'value2') "; where '' is an autoincrement field $fid= mysql_insert_id(); $fid has the value for the '' above "insert into table2 values('$fid', 'somevalue') "; Code (markup): If this is not what you wanted, sorry. Thanks