clanstyles Posted June 30, 2007 Share Posted June 30, 2007 <input type="checkbox" name="approved" id="approved" <?php if($f['enabled'] == "1") echo "checked=\"checked\""; ?>" /> it saves it as a boolean in the Db.. how do I set the bool in the DB? Quote Link to comment Share on other sites More sharing options...
pocobueno1388 Posted June 30, 2007 Share Posted June 30, 2007 You have to set the "type" part of the column to something other than "BOOL". What is it saving as a Boolean? I don't understand. You want it set to something different than a boolean, correct? Quote Link to comment Share on other sites More sharing options...
cooldude832 Posted June 30, 2007 Share Posted June 30, 2007 Bool is the same as tinyint meaning you can just say if($f['enabled']) beacuse it returns a bool 0 or 1 (0 is universal false 1 is universal True) Quote Link to comment Share on other sites More sharing options...
clanstyles Posted June 30, 2007 Author Share Posted June 30, 2007 Problem is..$values[8] = $_POST['approved']; right? <input type="checkbox" name="approved" id="approved" checked="<?php if($f['enabled']); ?>" /> but when I update updating $values[8] in the db it doesn't update. I have a print out going and it returns blank. but if i check it it saids on. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.