Webpage data storage method-PHP developers are developing a website using PHP. There are three pages, each of which allows users to enter some content; if you need to set up a database to save user settings on 3rd pages, how can you obtain data on 1 or 2 pages on 3rd pages; when the database has not been created in step 3 of step 3, the user should return to the previous page 3rd and modify it again. this kind of webpage data storage method -- PHP Development
The younger brother is developing a website using PHP;
There are three pages, each of which allows users to enter some content;
If you need to set up a database to save user settings on 3rd pages, how can you retrieve data on 1 or 2 pages on 3rd pages;
When the database has not been created in step 3 of step 3,
The user returns to the previous 1.2 page for further modification. in this case, the user needs to display some data that the user has just filled in. the user cannot leave nothing blank after the user returns the result and needs to be re-filled;
What should I do if there are many users? (Assume that 10 thousand million users use the service at the same time)
At present, I thought it was strange to set up a database after the user set up on pages 1 and 2 and read and process the database on 3rd pages.
For the first time, please kindly advise. Share The PHP website development database:
------ Solution --------------------
This younger brother, I think the first three steps can be written into the COOKIE or the SESSION. And then save it to the database.
------ Solution --------------------
You can also make three fake pages. in fact, three divs are switching back and forth. after the next page is clicked, the first div is hidden and the second display is hidden. in this case, the information entered earlier must be
------ Solution --------------------
The method on the first and third floors is good.
------ Solution --------------------
Or you can use the local stroage
For details, see
JavaScript local storage practices (html5 localStorage and ie userData)
------ Solution --------------------
Reference:
You can also make three fake pages. in fact, three divs are switching back and forth. after the next page is clicked, the first div is hidden and the second display is hidden. in this case, the information entered earlier must be
Why don't one page be used for the solution? one page is submitted in three parts, and the content can be changed as needed.
------ Solution --------------------
The server is under heavy pressure when the session is used by tens of thousands of users at the same time.
The general solution is:
Enter input on the first page and post it to the second page.
Fill in input on the second page and add the value submitted on the first page, as shown in figure
On the third page, enter input and add the values submitted on the first two pages, as shown in figure
And how to handle it?
------ Solution --------------------
The third floor is supported. if initialization is required, it can be used in combination with Ajax ~~~
------ Solution --------------------
Reference: