I am trying to do two things in the same form.
When delete is pressed and one or more records are checked one or more records are deleted. But when i select one record and a fill two text inputs in the same form and update is pressed then this record is updated.
Does anyone know how to do this in the form?
In the display file perhaps:
<form action="form" method="post">
Here come the displayed records with chechboxes
<input type ="text" name="voornaam" / >
<input type="text" name="achternaam" />
<input type="submit" value="update" />
<input type="submit" value="delete"/>
</form>
And in the delete file:
Maybe somthing with
if (isset($delete)){
then delete the checked records
}
else if (issset($update)){
update the single selected record
}
My question is how do I pass the value or the name of the two submit buttons to one single file that handles the form. Once I have the value or name of the clicked submit button how do I implement one of these two actions?
Are there any suggestions?
Thanks,
Jonathan