I have a form spread over 10 pages (client wants no scrolling!), this is done in PHP.
I have 10 links at the bottom, which when clicked should take the user to that part of the form AND submit the current form to update the database.
I use the "javascript:document.form1.submit();" code to submit the form when the user clicks on it. But then this obviously runs the PHP update code I've written which by default goes to the next page. i.e if on page 6 it will go to page 7.
What I want to do is when a user is on page 6 and then clicks on the page 3 link, it will submit the form and update the database, and then redirect to page 3, rather than page 7.
Any ideas how I do this? I've been thinking for 2 hours now, and can't get anywhere.
I have 10 links at the bottom, which when clicked should take the user to that part of the form AND submit the current form to update the database.
I use the "javascript:document.form1.submit();" code to submit the form when the user clicks on it. But then this obviously runs the PHP update code I've written which by default goes to the next page. i.e if on page 6 it will go to page 7.
What I want to do is when a user is on page 6 and then clicks on the page 3 link, it will submit the form and update the database, and then redirect to page 3, rather than page 7.
Any ideas how I do this? I've been thinking for 2 hours now, and can't get anywhere.