get_by_id($_SESSION['user_id'], $dbc); if ($user->level > 0) { if (strcasecmp($delete, "on") == 0) { delete_thread($dbc, $thread_id); header("Location: /"); exit(); } } header("Location: viewthread.php?id=$thread_id"); exit(); } header("Location: /");