Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- var_export($_POST);
- ?>
- <!DOCTYPE html>
- <html>
- <head>
- <title> http://stackoverflow.com/questions/11900510/submit-two-form-contents-onto-one-action-page </title>
- <script type="text/javascript">
- // wrong function
- function somefunction() {
- document.forms["form1"].submit();
- //alert('test');
- document.forms["form2"].submit();
- }
- </script>
- </head>
- <body>
- <form name="form1" action="" method="post">
- <input name="t1" type="text" value="t1">
- </form>
- <form name="form2" action="" method="post">
- <input name="t2" type="text" value="t2">
- </form>
- <input type="button" onclick="somefunction()" value="send" />
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement