0
Good afternoon! Guys, I made a form where I take the data from this form and send it to two related tables. One of them is the registration table (only with personal information) and another address table (which receives only the address). In the registration table there is an Address field that receives the forign key (Id_end) from the address table.
My problem is: when I fill out the form and send the data to the database, all fields of the tables are filled in, except the field (Address) of the registration table that receives the Foreign key.
I would like this field to be filled AUTOMATICALLY with the (Id_end), which is the primary key, address table. I’ve done a lot of research, but I couldn’t find a solution.
Follow a print of my code where I connect to the database and send the information obtained by the form.
Thank you, Murilo. It worked! I was stuck without being able to solve this problem. Thank you so much for your help. Hug.
– Célio Ferreira
@Célioferreira I’m glad it worked out! If the answer was helpful to you consider branding it as correct to help other people with the same doubt as you!
– Murilo Portugal