Is it possible to get the button ID? I have accumulated forms and I wanted to get the button clicked using the unique ID. The following scripts I used:
echo("<table><tr>
<td id=\"i\"><img src='presentations/uploaded_files/$name.png' alt='animal' width='50px' height='50px'/></td>
<td id=\"n\">$name</td>
<td id=\"d\">$dsc</td>
<td id=\"t\">$type</td>
<td id=\"g\">$grade</td>
<td id=\"b\">
<form enctype=\"multipart/form-data\" action=\"admin_update_animal.php\" method=\"POST\"><input type=\"submit\" value=\"Update\" name=\"update\" id=\"$name\"/></form></td>
</tr></table>");
I used the following when any of the button clicked:
if (isset($_POST['update'])) {
$f=trim($_POST['update']);
}
But I wanted to get which button clicked using its unique ID assigned. I am very glad for a help. Thanks.