html
<form action="check.php" class="login-form" method="post"> <input name="login" type="text" placeholder="username"/> ... </form> check.php
<?php $login = $_POST['login']; ... $user = "admin/".$login.".txt"; echo file($user)[0]; ?> Gives an error message -
Warning: file (admin / .txt): failed to open stream: No such file or directory ...
I thought that maybe $ login does not work, but in the same place changing the last line to
echo $login; It contained what you need. Why then the link does not add up?
var_dump($_POST);what gives? - Farkhod Daniyarov