I have a checkbox with a value of "yes" if it is checked. It inserts fine into the database if I actually check the checkbox. If I don't, then I get a php error.
Can you use html to have a value for checked and not checked or would I have to use php and do something like, if it isn't empty then it = yes or if it is empty then it = no.
before I write the php, I was just wondering if there was a simpler way just using html?
<input type="checkbox" data-toggle="checkbox" name="featured" value="yes"> Featured product </label>