Connection(); $postcon = new PostController($auth); if(isset($_POST['see'])){ header("location: /post.php?id={$_POST['see']}"); } if(isset($_POST['delete'])){ if($postcon->DeletePost($_POST['delete'])){ header("location: /be_panel.php?s=posts"); $auth->Log("Usunięto post o ID: {$_POST['delete']}", "Information", $auth->GetID($_SESSION['uToken_BE'])); } else $auth->Log("Nie udało się usunąć posta o ID: {$_POST['delete']}.", "Error", $auth->GetID($_SESSION['uToken_BE'])); }