NOTIFICATIONS
prepare("SELECT * FROM forums WHERE reports IS NOT NULL");
$stmt->execute();
$res = $stmt->fetchAll();
foreach($res as $post){
$times = substr_count($post["reports"], ",");
$times = $times==1?"1 time":"$times times";
echo "
Post ".$post["post_id"]." has been reported $times
";
}
if(count($res)==0){
echo "
Nothing has been reported.
";
}
?>