I need to make it so the items on my page are only displayed if the value in their database column is set to 1 (and 0 for no display). And I should be able to change those values with a checkbox toggle on my admin panel.
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.
Set database field value if checkbox clicked
in PHP Coding Help
Posted
Hi,
I need to make it so the items on my page are only displayed if the value in their database column is set to 1 (and 0 for no display). And I should be able to change those values with a checkbox toggle on my admin panel.
Ideally I wouldn't have to click submit either.
Table:
https://i.imgur.com/Qyz6s8v.png
In displayitem.php
I'm not getting the value here unless I add a submit button.
Guessing jQuery / AJAX is the way to go but can't seem to find any good tutorials on it, are there any other suitable approaches to this?