Hi guys, im new to php and mysql. I'm writing a script that writes to a MySQL database, it stores the data in table1, now I have a field that needs to be inserted in another table (table2) but it needs to have a column with the ID of the row that I just wrote to table1. The ID in table1 is auto generated by the MySQL database, its a auto increment column.
This is being used for a notes section, where each individual would have multiple notes and the notes would be linked to the individual by their ID found in table1.
The first time you add an individual to the database you have the option of entering the first note in the form, I would need that note to be inserted to table2 with the ID that tabel1 just assigned the individual.
Could someone please help me on how I can get the ID after it writes it and write the notes field to the 2nd column with the ID.