Bonjour à tous,

J'ai un problème, j'ai une simple page en php, avec un formulaire de login en html, qui marche pas, voici le code:
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
34
35
36
37
38
39
40
41
42
43
44
<?php
 
	session_start();
 
	if(isset($_POST) && !empty($_POST['login']) && !empty($_POST['$pass'])){
 
		extract($_POST);
 
		$pass = sha1($pass);
 
		mysql_connect("localhost","root","");
		mysql_select_db("sitepap");
 
		$sql = "select id from administrateur where login='$login' and pass='$pass'";
		$req = mysql_query($sql) or die(mysql_error());
 
		echo mysql_num_rows($req);
	}
 
?>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Page Administrateur</title>
</head>
 
<body>
 
	<form action="login.php" method="post">
 
    	<label for="login">Votre login : </label>
        <input type="text" name="login" id="login"/><br />
 
        <label for="pass">Votre pass : </label>
        <input type="password" name="pass" id="pass"/>
 
        <input type="submit" value="Me connecter" />
 
    </form>
 
</body>
</html>
Normalement ici, quand je clique sur me connecter, je devrais avoir un chiffre (nombres de lignes), alors qu'il ne se passe rien, je comprends pas pourquoi!

J'aimerai avoir de votre aide merci infiniment