Say I want to make double action in HTML form.
- The first action would be to examle1.php
- And the second action would be to example2.php
I have code like this
<form name="input" action="" method="post">
Username: <input type="text" name="user">
<input type="submit" value="Submit">
</form>
So, how to insert the 2 actions above to the action=""?
Is it possible to do that?
No. You can have only one declared
actionattribute for the<form>You can however, try:
Doing an AJAX POST for your first action and submitting the actual form on its success handler
Writing the server side script for your first action such that it redirects to your second action after it done.