I am working on a php/html/js page.
I have two buttons. They both need to submit the same form data, but I want one to link to another page(which needs the form data from this page) and one to do something on the current page.
I don't know how to make the linkage button go to another page AND post the same form data AND not lose the post data (using something like header('Location:')).
I can't set form action="page.php" because then both buttons would change pages. A form within a form doesn't work either.
My setup is as follows:
<form method="post" action="" name="aform">
<table>
<tr><td><input type="submit" name="button" value"Clickit"></td>
<td><input type="submit" name="button2" value"Click to link"></td>
</table>
</form>
Help appreciated.