I'm kinda of confused here but maybe its only that I need some sleep. Anyways, I'm trying to code this script where I have a page for settings. Here is my settings page scode.php Looks like this The current number I have in the database is 0. I wanted to make it so that if its checked, the number 1 enters the database instead of the current 0. What am I doing wrong? Once I press submit, the number 0 disappears completely from the database. Thanks for the help in advance
<form method='post' action='scode.php'> <input type=checkbox name='img'> <input type='submit' name='Submit' value='UPDATE' class='button'/></form> PHP: $change=$_POST['img']; if(isset($change)){ $change='1'; //put update code here. if default in field is not 0, add else $change='0'; at the end } PHP: