public function add() { if (isset($_SESSION['client'])) { $client = unserialize($_SESSION['client']); if (isset($_POST['add'])) { $contactsModel = new ContactsModel(); $contact = $contactsModel->create($_POST['name'], $_POST['mail']); } $this->helper->redirect('/contacts/getAll'); } else { $this->helper->redirect(); } }