Submitting form data to various locations based on link

lyova

New Member
I have a multi-page form. Each page posts data form one to the next, where PHP stores the POST data as Session data. At the end of the table this session data is displayed in a summary table before final submission stores that session data in a MySQL database.There are two ways to navigate away from a form page: both options to submit the form data.1) The submit button which performs the form action, and navigates the user to the subsequent form page.2) A page menu, from where the user can land on any other form page. I use JavaScript on the menu navigation to prompt submission:\[code\]$('#menu a').onclick { $('#myform').submit();});\[/code\]However the submit action of the form is:\[code\]<form id="myform" method="post" action="?page=survey-2">...form fields...</form>\[/code\]So instigating submit only posts the updated data to the subsequent page.In the use-case: user fills out form, arrives at summary page, sees and error uses the menu to navigate back to a page, alters it and uses the menu to jump back to summary page: nothing changes, obviously because the updated data is ONLY being submitted to the following page, NOT the destination of their navigation.Is there a way I can use js (or anything) such that when a link is clicked in the menu, the DESTINATION of that navigation link, also receives the form data? Or alternatively, that the action of the form can submit to all the pages at once (but default navigation is to the subsequent page only)?Thanks for your consideration
 
Back
Top