Update value with toggle button type checkbox using POST method
Hi there, I would like to implement an easy way to change status on a column type BOOLEAN in my database. So the idea is to use a toggle button to update value from 0 to 1 or vice versa . When I click the button on, I want to update it to "1" and when I click the button off I want to set it to "0" using MYSQLI update query. I'm currently working with an input type checkbox with the attribute onClick="this.form.submit()" but when I chick the button I only able to set it to 1 but when I click it to off does not change. So, if is possible to done it with just mysqli and the button, can you please give me some idea ? I'm going to attach the button and my query so you can see what I have donde.