dcsimg
www.webdeveloper.com
Results 1 to 2 of 2

Thread: How do you store state of checkbox in a phpmyadmin database

Hybrid View

  1. #1
    Join Date
    Jun 2014
    Posts
    6

    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.

  2. #2
    Join Date
    Jun 2014
    Posts
    6
    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

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles