Here is the authorization code. Yes, without mysql. Yes, terrible, but still.
<? $filename = ("base.txt"); function AuthForm () { echo ('<form method=\'post\'> <label>Логин: </label> <input type = \'text\' name = \'login\'><br /> <label>Пароль: </label> <input type = \'password\' name = \'password\'><br /> <input type = \'submit\' name = \'log\' value = \'Войти\'> </form>' ); } if(empty($_POST)) { }else { $arr = file($filename); $i = 0; $temp = array(); foreach($arr as $line) { $data = explode("|:|",$line); $temp['login1'][$i] = $data[0]; $temp['password1'][$i] = $data[1]; $i++; } $login = $_POST['login']; $password = /*md5*/($_POST['password']); if(!in_array($login,$temp['login1'])) { echo("Пользователь с таким именем не зарегистрирован. <a href='#'>Вернуться</a>"); exit(); } $index = array_search($login,$temp['login1']); if($password != $temp['password1'][$index]) { echo("Неправильный пароль. <a href='#'>Вернуться</a>"); exit(); } } ?> Here is the authorization on the site:
<? require ("auth.php"); AuthForm(); ?> Who has already connected this nonsense, please help. Already tried everything.