so i want to read text file and password have to match with user. if open tset.php>>>
it read 123.txt file and check password and if is right
it prints first name and lastname
TEST.PHP
************
<?PHP
$dataname = $HTTP_GET_VARS['u'+'.txt'];
$pass = $HTTP_GET_VARS['p'];
if(file_exists($dataname))
{
$data = fopen($dataname, "r"
if ($data)
{
$line1 = trim(fgets($data, 255));
$line2 = trim(fgets($data, 255));
$line3 = trim(fgets($data, 255));
fclose($data);
}
}
if ($pass = $line1)
{
echo "$line2";
}
echo "wrong password";
?>
*************
123.TXT
*************
qwerty
jack
dalton
*************
it read 123.txt file and check password and if is right
it prints first name and lastname
TEST.PHP
************
<?PHP
$dataname = $HTTP_GET_VARS['u'+'.txt'];
$pass = $HTTP_GET_VARS['p'];
if(file_exists($dataname))
{
$data = fopen($dataname, "r"
if ($data)
{
$line1 = trim(fgets($data, 255));
$line2 = trim(fgets($data, 255));
$line3 = trim(fgets($data, 255));
fclose($data);
}
}
if ($pass = $line1)
{
echo "$line2";
}
echo "wrong password";
?>
*************
123.TXT
*************
qwerty
jack
dalton
*************