There is a simple task: a number is entered - the number of lists (after entering lists are displayed). And there are 2 more input. Filling lists - it does not matter. Due to the lack of knowledge of Javascript, I am trying to do at least some usability. Namely, forms appear as you type, i.e. introduced - get the following.

The first option was to "accumulate" the code, i.e. each following file contained all previous + one new. Later decided to abandon this idea, because there were a lot of files (handlers) and I had to “tie” a lot into hidden fields of the form for transmission through one file, i.e. it is clear that I will receive data from the current handler through $_POST , and the next one is gone. I decided to make one file, but transfer data using the GET method (only admins will use this page, so security issues can be omitted).

So, how can I get the link in the form handler to add GET parameters, and not replace it. Those. I want to accumulate data in GET. I get the current address with the parameters and pass in the form, and he immediately after the name puts his own parameters, replacing the previous ones.

Example:

 <form action="index.php?select_1=(не суть)&num_lvl_1=(не суть)" name="abc" method="GET"> 

I get: index.php?abc=(не суть) . And I want: index.php?select_1=(не суть)&num_lvl_1=(не суть)&abc=(не суть) . Those. so that the parameters were added to the end and did not erase the previous ones.

How to do it? Or maybe offer your solutions.

  • In a word - nonsense. Nothing is clear about your problem ... - AseN
  • @Andrey Baksha, you have a talent to explain) It is almost clear what you want, but it is unclear what _POST didn’t please you. Where can that divide? - Vitaly Kustov
  • @Vitaly Kustov Well, look. There are valid 3 forms => 3 handler files. At the start there is one: filled. A second (another file) appeared, and the first one should also have a value. Now I can get it through POST. Received, filled the 2nd form. The 3rd appeared, i.e. 3rd file. I cannot receive now value from the first form through. It is necessary to "fasten" it in the 2nd hidden field and drag it along all the forms. - Ray

1 answer 1

Instead

 <form action="index.php?select_1=(не суть)&num_lvl_1=(не суть)" name="abc" method="GET"> 

Do

 <form action="index.php" name="abc" method="GET"> <input type=hidden name=select_1 value="(не суть)" /> <input type=hidden name=num_lvl_1 value="(не суть)" /> 
  • For sure! Thank! - Ray