<td> <input type="checkbox" name="mainhot" value="" <?php echo $row->mainhot ? 'checked="checked"' : ''; ?> /> </td>
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.