bonjour,
j'écris un script d'authentification en html perl/cgi
mon script html se présente comme çà:
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <title>logclient.html</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body> <form name="f1" action="logcli.cgi" method="post"> login :<input type="text" name="login"><br /> password:<input type="password" name="pass"><br /> <input type="submit" value="Go"> </form> </body> </html>
mon script de traitement cgi se présente comme-ci
et çà marche pas! ou ai-je bien pu faire une erreur ou des erreurs?
Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
26
27
28
29
30
31
32
33 #!/usr/bin/perl use CGI; $page= new CGI::new(); print $page->header(), $page->start_html(); $log=$page->param("login"); $pass=$page->param("pass"); $part='nfa054/part.txt'; if(open(part,$part)) { while($lignes=<part>) { ($log,$pass)= split(/,/;lignes); if($log eq $page-> param('login')); { if ($pass == param('pass')) { print $reg->p('identification r\u00e9ussie'); } else { print $reg->p('mauvais mot de passe!'); } } } }
cordialement,
Partager