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