Bonjour j'ai un problème j'arrive pas à me connecter à une page login. Voici le code pouvez-vous m'aider. merci
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
 
<?php
	session_start();
	mysql_connect("localhost", "root", "");	// Connexion à la base de donnée
	mysql_select_db("web-011");	// Sélection de la base de donnée
	$reponse =mysql_query("SELECT * FROM tbl_login"); // Permet d'afficher les données
 
if (@isset($_POST['btnlogin'])) // Si la variable existe
{
	$login=$_POST['login'];
	$pass=$_POST['password'];
	while ($donnees = mysql_fetch_array($reponse) ) // Boucle pour afficher toutes les données
	{
		$loginbd=$donnees['Login'];
		$passbd=$donnees['Pass'];
	}
 
	if (md5($pass) === $passbd) 
	{
		if($login=$loginbd )
		{
			header("Location: ./offre.php");
		}
	}
	else
	{
		header("Location: ./offre_mod.php"); 
	}
}
?>
 
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
        "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
	<link rel="stylesheet" type="text/css" href="..\CSS\style.css" />
	<title>Web-011</title>
</head>
<body>
	<form method="post" action="login.php"><br /><br />
					<table border="0" width="400" align="center">
						<tr>
							<td width="200"><b>Utilisateur</b></td>
							<td width="200">
								<input type="text" name="login">
							</td>
						</tr>
						<tr>
							<td width="200"><b>Password<b></td>
							<td width="200">
								<input type="password" name="password">
							</td>
						</tr>
						<tr>
							<td colspan="2"></br>
								<input type="submit" name="btnlogin" value="Se connecter">
								<input type="reset" name="reset"  value="Effacer" />
						</tr>
					</table>
				</form>
</body>
</html>	
<?php
mysql_close();
?>