public function delete($id) { if (!$id) { header("Location: /email"); } else { if (user::accessLevel($_COOKIE['id']) == 1) { email::DELETE($id); echo '<a href="/email">INDEX</a>'; echo "<br><br><br>email [{$id}] deleted"; } else { //alert("YOU HAVE NO ACCESS"); header("Location: /email/view/{$id}"); } } }