PHP:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
| <? function verify_admin($login, $passw){ if (!file_exists("user.usr")) return 0; $fp=@fopen("user.usr","r"); if($fp) { while(!feof($fp)){ $buf=fgetcsv($fp, 255, ";"); if (!is_array($buf)) {continue;} if(!ereg("^[#]",$buf[0])){ $l=$buf[0]; $p=$buf[1]; if ($login==$l && $passw==$p && $login!="" && $passw!="") //return 1; ?><B>OK</B><?PHP } } } //return 0; ?><B>ERROR</B><?PHP } ?> |
waar zit de fout?
hij laat niet OK zien als ik t goeie w8woord ingevoerd heb. en anderzom.
$login en $passw heeft de gebruiker ingegeven.