I just wanna ask how can I make a form with two buttons that do different functions? Like for example: I have this table with checkboxes and when a checkbox was checked and a certain button was clicked, the button will perform its assigned task.
Button1 can add, button2 can delete.
Can you help me again, please? I’m kind of new at this and I really want to know. Thank you!
This is more of a JavaScript question than PHP.
You’ll need to add an
onclickto your buttons:Then create these functions in JavaScript:
Here’s a basic example of where you can stick your JavaScript etc: