query("select count(*) as nb from notification where status = 9 and roles='".$_POST['ROLES']."'"); $r = $q->fetchAll()[0]; echo $r[nb]; } else { // otherwhise you want to load the info about the newest notification to display and set the status to 1 so it wont be displayed again $q = $db->query("select * from notification where status = 9 and roles='".$_POST['ROLES']."' order by id limit 1"); $r = $q->fetchAll()[0]; $db->query("update notification set status = 1 where id = $r[id]"); echo $r[info]; } $filename="include/ArielBubur.mp3"; print '
'; ?>