<?php include_once 'controller/ApiYandexController.php'; $start = new ApiYandexController(); $data = false; if (!empty($_POST) && !empty($_POST['iname']) && !empty($_POST['fname']) && !empty($_POST['login']) && !empty($_POST['password']) && !empty($_POST['domain'])) { $data = $start->addUser($_POST); header('Location:index.php'); } $domains = $start->actionAdd(); ?> <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <link href="css/main.css" type="text/css" rel="stylesheet"> </head> <body> <div class="body"> <div class="menu"> <a href="index.php">Назад</a> </div> <hr> <h3>Добавление нового пользователя</h3> <form action="add.php" method="post" autocomplete="off"> <input type="text" name="iname" placeholder="Имя" autocomplete="off"> <input type="text" name="fname" placeholder="Фамилия" autocomplete="off"> <select name="domain"> <?php foreach ($domains as $domain) { ?>