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:
<td><button type="button" id="himbeerhonig" onclick="function()">press me to execute function</button></td>
(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
refresh the <td id="himbeerhonig"> with the updated value.
Can someone help me do this?