<?php
$f = file("users.txt");
$d = 0;
print_r($_POST);
print_r($f);
for($i = 0; $i < count($f)-1; $i++){
if($_POST["name"] == "name"){
if($_POST["password"] == $f[$i + 1]){
header("Location: https://mysiteeeeee.000webhostapp.com/pagess.html");
}
}
}
<?php
$f = file("users.txt");
$d = 0;
print_r($_POST);
print_r($f);
for($i = 0; $i < count($f); $i++){
if ($_POST["name"] == "name"){
if ($_POST["password"] == trim($f[$i])){
header("Location: https://mysiteeeeee.000webhostapp.com/pagess.html");
}
}
}