I manage some sortiment items on a page, they get displayed with a PHP script. I want an admin page that "toggle" via a sortiment table to display or not display an item.
Scenario: if the button is clicked, I would like to start a php-skript. There should be a value passed to that script from where the button was clicked.
The table entry looks like this:
<tr>
<td>Himbeerhonig</td>
<td id="himbeerhonig">Ja</td>
<td><button type="button" id="himbeerhonig" onclick="function()">press me to execute function</button></td>
</tr>```
(possible PHP pseudocode)
open SQL connection
look for database entry based on the passed ID
change the value of the found entry (!currentValue)
close SQL connection
*optionally*
refresh the <td id="himbeerhonig"> with the updated value.
Can someone help me do this?