I got this script that logs users in and it gathers info from txt file like username and password.. here is a example of a File for Megahertza.txt
Megahertza
Radeon
deanbowden11@msn.com
Australia
Computers, Cars, PHP
03 : 27 : 54 , Wed : Oct : 2004
The first line is the username and the second is the password for this user.
If i log in with the username and password its says ("password corect") once i log off and then try to log in with the correct username but incroect password it still says corect password
session_start();
header("Cache-control: private");
$name = $_GET[name];
$pass = $_GET[pass];
// Checks to see if the users file exists
$file = ('User/'.$name.'.txt');
if (file_exists($file)) {
$fp = file($file);
echo 'User exists';
// check to see if supplied password is equal to the 2nd line of user files
if ($pass == '$fp[1]') {
echo '<div align=\'center\'>Password matches selected User.</div>';
echo '<div align=\'center\'>You will be directed to the main page in 5 seconds.</div>';
$member = "yes";
$_SESSION["member"] = "yes";
$_SESSION["name"] = "$name";
} else {
echo 'Password Incorect';
echo '<div align=\'center\'>You will be directed to the main page in 5 seconds.</div>';
}
} else {
echo 'No such user exists in database';
}
I have cut out all of the javascript redirection scripts