I have a simple password script in which the username/password info is displayed as follows:
....and so on. I am trying to create a loop that will automatically generate that code for the number of users I require (i.e. if $ClientNumber = 10, then that function would be printed 10 times. Also, I need the number in the variable $un and $pw to be increased each time, as well (so I can control them with included individual variables).
This is what I have so far, but now I am stuck. I may be totally off because I am very new at this....
Any help is really appreciated! I am trying to learn PHP and any hints will be great!
thanks!
PHP Code:
if($name == $un1 && $pass == $pw1){
Header ("Location: page1.html");
exit;
}
if($name == $un2 && $pass == $pw2){
Header ("Location: page2.html");
exit;
}
This is what I have so far, but now I am stuck. I may be totally off because I am very new at this....
PHP Code:
$ClientNumber = 10;
while ($ClientNumber > 0)
{
print (
if($name == $un1 && $pass == $pw1){
Header ("Location: page1.html");
exit;
}
);
$ClientNumber--;
}
thanks!
Comment