I am trying to send form from 1.html to 1.php and 2.php depending on submit button which was hit.
The idea is: I fill form then hit button no. 1 to generate report no.1, after that I go back to form.html and hit button no.2 to generate report no.2. I need this to be done this way so data are still in form.html
This soluton is working but the form is not containing data after going back and thats why its useless in my case:
Code: Select all
<form id="form" method="post">
<input type="submit" value="1" onclick="document.getElementById('form').action='test1.php';" >
<input type="submit" value="2" onclick="document.getElementById('form').action='test2.php';" >
Thanks for help as I am stuck with this for last 4 days.