Nieuw lid |
|
Er komen allemaal meldingen dat er iets mis is als deze zin moet komen :
Sorry the password username combanation does not exist.
kan iemand mij helpen dit te voorkomen
( de meldingen komen alleen als de inlognaam en het password fout zijn )
<body bgcolor="#000000" text="#FFFFFF">
<?PHP
$Uname='';
$Pass='';
$contents='';
if ($_REQUEST['Uname'] != "") {
$Uname = $_REQUEST['Uname'];
} else {
die('You need both a Username and password to login');
}
if ($_REQUEST['Pass'] != "") {
$Pass = $_REQUEST['Pass'];
} else {
die('You need both a Username and password to login');
}
$fp = fopen("imgs/".$Uname.".nam","rb");
$contents = fread($fp, filesize("imgs/".$Uname.".nam"));
fclose($fp);
$pieces = explode(" ", $contents);
if ($pieces[2] == md5($Pass)) {
setcookie('User',$Uname,time()+(60*60));
} else {
die ('Sorry the password username combanation does not exist');
}
header("Location: http://" . $_SERVER['HTTP_HOST'] . rtrim(dirname($_SERVER['PHP_SELF']), '/\\') . "/index.php");
?>
<body bgcolor="#000000" text="#FFFFFF"> <?PHP $Uname=''; $Pass=''; $contents=''; if ($_REQUEST['Uname'] != "") { $Uname = $_REQUEST['Uname']; } else { die('You need both a Username and password to login'); } if ($_REQUEST['Pass'] != "") { $Pass = $_REQUEST['Pass']; } else { die('You need both a Username and password to login'); } $fp = fopen("imgs/".$Uname.".nam","rb"); if ($pieces[2] == md5($Pass)) { } else { die ('Sorry the password username combanation does not exist'); } header("Location: http://" . $_SERVER['HTTP_HOST'] . rtrim(dirname($_SERVER['PHP_SELF']), '/\\') . "/index.php"); ?>
|