How do you store state of checkbox in a phpmyadmin database
Whether checked or unchecked. What I have so far is like this:
in the php site where user inputs I have this <input type="checkbox" name="check" id="check" >
and the php to post the state which is like the confirmation page I have this <input type="checkbox" <?php echo (isset($_GET['check']) ? 'checked' : '');?> disabled> . So I want to be able to do what I did with the confirmation page, but with a database, to be able to store the state in the data base.
I solved it, for anyone interested, all I had to do was store any value on the database when the checkbox was checked, you know like 1, or on, and the in the form make a if statement for when the value that is stored is equal to 1 or whatever, echo a input box that is checked else echo input box empty
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Tags for this Thread