Send data to different pages in one form

Asked

Viewed 159 times

1

Good afternoon guys, I have a form that needs to do 2 different actions, 1 of them is to update a php page with name update.php and another to delete with name delete.php, I need to depend on the option clicked the form send to update or delete, however I do not know how to do, someone can help?

  • Make a page where you do both actions

  • But if it is extremely necessary, if you really do not have to do the two actions in a single PHP page, ai vc can use $.ajax() and send to both

  • Post the code of your form, to do this, you will need to use javascript, jquery perfectly solves your problem.

1 answer

0

You can put a combo inside your form and add an event inside it that takes the selected option and then change the form action accordingly.

Kind of:

inserir a descrição da imagem aqui

Browser other questions tagged

You are not signed in. Login or sign up in order to post.