button - php two actions in one form -


i have question other options... have form this...

<form action="edit.php" method="post"> . . . . <button class="btn btn-success"  name="submit_mult" type="submit">edit</button> </form> 

i have button called (delete) inside of above form in same page take action delete.php page.

but delete button need action delete.php, used action="edit.php" see above codes

how can solve make both works!

am

you can use formaction attribute on button:

<button type="submit" formaction="delete.php">delete</button> 

this overrides action attribute of form when click on button.


Comments

Popular posts from this blog

java - WrongTypeOfReturnValue exception thrown when unit testing using mockito -

php - Magento - Deleted Base url key -

android - How to disable Button if EditText is empty ? -