Right before redirect I want a field to be updated with 'expired' ...the $sql2 query below doesn't seem to be updating the value in my db..
$db = @mysql_connect('localhost','','');
mysql_select_db('journals');
$SQL= "SELECT regdate, last_login FROM users WHERE username='".($_POST['username'])."' AND (DATE_ADD(regdate, INTERVAL 30 DAY) < last_login)";
if(mysql_num_rows(mysql_query($SQL))>0){
$SQL2 = "UPDATE users SET status='expired' WHERE username='".($_POST['username'])."'";
print "<script type=\"text/javascript\">window.location = \"home.php?page=manage&action=billing\";</script>";
} else {
print "<script type=\"text/javascript\">window.location = \"home.php?page=manage\";</script>";
}