switch ($_GET["a"]) { case 'logout': unset($_COOKIE['ea_user']); setcookie('ea_user', null, -1, '/'); break; case 'delete_post': post::delete_post($_GET['id']); header("Location: index.php?p=" . (isset($_GET["is_page"]) ? "pages" : "archive")); break; case 'delete_category': category::delete_category($_GET['id']); header("Location: index.php?p=category"); break; case 'delete_comment': comment::delete_comment($_GET['id']); header("Location: index.php?p=comment"); break; case 'delete_image': media::delete_media($_GET['id']); header("Location: index.php?p=images"); break; case 'delete_sm': social_media::delete_social_media($_GET['id']); header("Location: index.php?p=social_media"); break; default: # code... break; } } ob_end_flush();