I’m trying to put two submit buttons into one form, one button will update a record and another button will delete it.
<form>
<input type="submit" value="UPDATE"/>
<input type="submit" value="DELETE/>
</form>
How these should be handled in php? What’s the best way to do it?
You can just add a name:
and use
$_GET['action']or$_POST['action'](depending if you usegetorpostfor form).