1
1
1773337472020-11-13 19:30:19
PHP
177333747, 2020-11-13 19:30:19

How to write data from forms on different pages to one DB row?

Hello, I have a registration form with several fields: Name, Email, and so on. After I fill in the fields and click on the "NEXT" button, the data is filled in the database, and a new form appears on another page in the same style with other fields: Photo, About me, etc. and I also press "NEXT", and the data is also entered into the database, but the problem is that it is already in a new line, i.e. fields Name, Email remain empty. How can I make it so that everything is on one line. If you do not understand something, I will clarify
5faeb60dc3cb1460766346.png

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Ilya S, 2020-11-14
@177333747

Alternatively, do not save anything to the database until all the steps have been completed.
Between steps, save data either in the session or on the client.

C
CarfikDK, 2020-11-13
@Carfik

Make sure that after submitting the first form, you are given an ID, and then do an update using this ID

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question