blade_922 Posted September 14, 2006 Share Posted September 14, 2006 [code]<td> <input type="checkbox" name="mainhot" value="" <?php echo $row->mainhot ? 'checked="checked"' : ''; ?> /></td>[/code]K so thats the code above. What im doing is creating a check box. So if the checkbox is checked then value in database will change to '1' if its then unchecked it will change to '0'Ok so with this code i manage to change the value in the database to 1 for the first time. Then when i try to uncheck it and click save on my page it ends up staying checked and the value doesnt go back to 0.I dont have a clue why its doing this. Hope you can assist.Regards Link to comment https://forums.phpfreaks.com/topic/20772-checkbox-php-small-problem/ Share on other sites More sharing options...
HuggieBear Posted September 14, 2006 Share Posted September 14, 2006 Can you actually show me the php?I need to see what's going in and coming out of the database.CheersHuggie Link to comment https://forums.phpfreaks.com/topic/20772-checkbox-php-small-problem/#findComment-91979 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.