HTML form with multiple "actions" -


i'm setting form wherein need 2 "actions" (two buttons):

1 - "submit form approval"
2 - "save application later"

how create html form supports multiple "actions"?

eg:

<form class="form-horizontal" action="submit_for_approval.php">
<form class="form-horizontal" action="save_for_later.php">

i need combine these 2 options-for-submitting 1 form.

i did basic research couldn't find definitive answer whether or not possible, and/or resources links workaround.

thanks in advance.

as @alik mentioned, can done looking @ value of submit buttons.

when submit form, unset variables evaluate false. if set both submit buttons part of same form, can check , see button has been set.

html:

 <form action="handle_user.php" method="post" />   <input type="submit" value="save" name="save" />   <input type="submit" value="submit approval" name="approve" /> </form> 

php

 if($_post["save"]) {   //user hit save button, handle accordingly } //you can else, prefer separate statement if($_post["approve"]) {   //user hit submit approval button, handle accordingly } 

edit


if you'd rather not change php setup, try this: http://pastebin.com/j0guf7mv
javascript method @alik reffering to.

related:


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -