Hi, I have a problem with a PHP3 password protected site.
The script is set up for each passwort and user to go to a different page. I just want to allow up to 5 user to go with different password and usernames to the same page, but can´t get the script working.
It looks like this:
in the protected Page:
<?
if ($nme!="unsername1"" && $ppwwdd!="password1"):
echo "Zugriff verweigert!!!";
exit;
endif;
?>
in the pwd.script:
<?
$name=strtolower($name);
$passwort=strtolower($passwort);
$datei=fopen("pwd.dat.php3","r");
while(feof($datei)==0):
$nme=chop(fgets($datei,110));
$pwd=chop(fgets($datei,110));
$seite=chop(fgets($datei,500));
if ($name==$nme):
if ($passwort==$pwd)
header("location: ".$seite."?ppwwdd=".$passwort."&nme=".$name."");
endif;
endwhile;
fclose($datei);
?> <font face="Arial, Helvetica, sans-serif">User oder Passwort falsch!</font>
and the passwords/users are defined in a page:
<?
#############################
echo "ZUGRIFF VERWEIGERT!";
exit;
#############################
?>
username1
password1
page1.php3
username2
password2
page1.php3
It won´t allow me to direct 2 user to go to the same page. I changed the script in the page1.php3 in many different ways, but could´nt find the one that works :´-(
P L E A S E H E L P M E
Gregor.