IF structure design is messy! If you have the following requirements, you are advised to guide INPUT form 1 & lt; inputtypetextnameid1value & gt; for INPUT text 1 & lt; inputtypetextnameid2value & gt; for INPUT text 2 & lt; inputtypesumbitnameidavalue; IF structure design is messy!
You have the following requirements.
INPUT Form 1
// Input text 1
// Input text 2
// Used to submit input information
I want to click submit ida and then output the INPUT form 2.
// Input text 1
// Input text 2
// Used for further submission of input information
// Return the interface of the previous input Form 1, but store the single input information of the table.
After clicking submit idb, enter Form 3.
I want to click submit ida and then output the INPUT form 2.
// Input text 1
// Input text 2
// Used to submit input information again
// Return the interface of the previous input Form 2, but store the input information of Form 2.
Enter the play Information. when you click the return button on the interface, you can save the information at the upper level for easy modification. For guidance ........ The header designed with the IF structure is a little big...
------ Solution --------------------
Directly pass the parameter through url
Or save it in the session.
Add a step to the url to identify the first step.
------ Solution --------------------
This is a typical ajax application.
A. write all the parts to be entered in
Internal
B. by default, the first p is displayed. when ajax is submitted, the second p is displayed.
C. analogy B
Content to be mastered
1. js/Jquery controls p hiding and display
2. jquery's ajax method POST/GET
------ Solution --------------------
It's okay with php.
HTML code
Script function goBack (id, o) {document. getElementById (id ). style. display = 'block'; o. parentNode. style. display = 'none';} function goNext (id, o) {document. getElementById (id ). style. display = 'block'; o. parentNode. style. display = 'none';} script
------ Solution --------------------
The session records are saved in the session and added to the session records for status transfer and data based on the request and current status.
------ Solution --------------------
After reading it for a long time, I finally figured out what you mean.
Take a look at this test example, it should be what you want
PHP code