php - Form over several pages - URL should remain -


I do not know that my English is enough to explain this right: I have made a form that is 4 or 5 Pages are not required until the final submission is made, on each change, the post is added to the new page as a hidden field and a new script is called.

  & lt; Form method = "post" action = "form4.php" & gt;  

My problem is that I do not want the browser to show the URL in the new script and keep it on the ideal original URL.

I do not know the right words for a solution Search Google or here Maybe you can give me an indication for this to happen?

Another option is the same script in the step.

  & lt; Form action = "formhandler.php" method = "post" & gt; & Lt; Input type = "hidden" name = "form_stage" value = "1" /> .... & lt; / Form & gt;  

and within the formhandler.php:

  switch ($ _ POST ['form_stage']) {case 5: // step 5 handle the stuff here break; Case 4: // Step 4 Control the luggage, Step 5 for the brake Output Form; Case 3: // Step 3 Handling stuff; Output form for platform 4 brake; Case 2: // Detroit Break; Case 1: Default: // Display initial form here}  

Of course, you do not need to use a switch for it. If works with / F, it comes under personal preference / code complexity. But this basic workflow allows you to display a number of different forms without having to keep the same URL and support AJAX / javascript.


Comments

Popular posts from this blog

Eclipse CDT variable colors in editor -

AJAX doesn't send POST query -

wpf - Custom Message Box Advice -