ow iam sorry hehe
well the code is working now
but the wrong way hehe
i wanted to have a code when switching from day he do it but now he stay entering the code
till it is the next day
only wanted to do the code when the switch is going to the next day
PHP Code:
$result = $DB_site->query_first("SELECT * FROM other WHERE time"); // shouldn't there be a WHERE clause?
$daytoday1 = $result['time'];
$time1_today=date("D d-m-y");
//$daytoday1=$DB_site->query("SELECT * FROM other WHERE time");
if ($daytoday1 == $time1_today) {
$DB_site->query("UPDATE other SET test='$time1_today'");
} else {
$DB_site->query("UPDATE other SET time='$time1_today'");
$DB_site->query("UPDATE user SET level=level-1");
}
Thanxs