I'mt trying to create a plugin which adds a custom page in the admin panel. I have a checkbox with name "deposit_sandbox" if check true it should update the option in the database to true, if not selected it should update the option in the database to false.
how do I check if a checkbox was selected and then update the database with update_option() function?
It works if I leave the action blank and then use $_POST, but I would need to do this for each item in my form. if there is a workaround please let me know :)