Jump to content

Check boxes in PHP/MySQL


RynMan

Recommended Posts

Hey guys

 

I've got a form where it is returning a record from my database query. 

 

There is a field on my form that is a checkbox, and I'm trying to get it to correspond to a field in my DB that is currently a tiny integer (0 and 1's at present). 

 

Unlike the text fields, I've had no success when using the field from the array (of my query) as the "value" for the input.  Does html not interpret a 0 as unchecked, and 1 as checked?  How can I make it do so? 

 

Then, in addition to that, how do I then code that into my UPDATE query?

 

Many thanks...

Link to comment
https://forums.phpfreaks.com/topic/164723-check-boxes-in-phpmysql/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

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.