I am writing a site for self-study. At this point, I stopped at the script to enter the user's site using the "Логин"
and "Пароль"
fields. Everything is as it should be - a form, a script for processing this form. In general, when you click on the "Вход"
button "Вход"
script is processed that checks the correctness of the data (compares it with the database in which the registered users are located). In this script, first the data from the $_POST
array is taken.
$login = $_POST['login]'; $password = $_POST['password'];
Further, this data is checked for value by the isset
function:
if(!isset($login) or !isset($password)) { exit("Пользователь с таким логином или паролем не найден"); }
And when I click on the "Вход"
button, the script ends with a message
"User with this login or password not found"
but the most interesting thing that I put in front of this condition was the output of these two variables ( $login
and $password
), I got them out normally and showed just what I entered in the "Login" and "Password" fields.
What could be the problem?
I also tried instead of !isset
to set empty
, it still fails with the error of the existence of $login
and $password
variables.
I packed these two files into the archive at .
This is why it did not work