Hey I have found myself in a weird diemma with this checkbox problem, the point of it is, that if the checkbox is checked or unchecked it is recorded in the mysql DB and the checkbox is checked or unchecked according to the DB, here is my code so far
//Makes checkbox checked
$query = "select filtered from settings where application='tagwall'";
$result = mysql_query($query);
$fetch = mysql_fetch_array($result);
extract($fetch);
if($filteredcheckbox != $filtered) {
echo "$filteredcheckbox different than $filtered<br>";
$query = "update settings set filtered='$filteredcheckbox' where application='tagwall'";
mysql_query($query);
}
if($filtered == "on") {
$checked = "CHECKED";
}
elseif($filtered != "on") {
$checked = "";
}
The main problem is that the checkbox is unchecked and checked randomly