<?php require __DIR__ . '/../autoload.php'; $admin = new \Model\users\Admin(); $res = $admin->verify($_POST['id']); //var_dump($res); $mass = ['id' => $_POST['id'], 'title' => $_POST['title'], 'text' => $_POST['text']]; $ups = $admin->updateNews($mass); include __DIR__ . '/../View/templates/admArt.php';
<?php require __DIR__ . '/../autoload.php'; if (empty($_POST['title']) && empty($_POST['text'])) { include __DIR__ . '/../View/templates/admNews.php'; die; } else { $mass = ['title' => $_POST['title'], 'text' => $_POST['text']]; $admin = new \Model\users\Admin(); $res = $admin->insertNews($mass); include __DIR__ . '/../View/templates/admNews.php'; }
<?php require __DIR__ . '/../autoload.php'; $admin = new \Model\users\Admin(); $res = $admin->verify($_GET['id']); //var_dump($res); include __DIR__ . '/../View/templates/admArt.php';