bonjour , ne fait , j ai fait une page d authentification , qui contient deux champs de texte (login et pass ) et deux bouttons ( valider et annuler )
j ai une bdd "hotpixelgames" et une table appelée "admin" la ou y a 3 champs "id , "login" et " pass" ,
je veux integrer du code php dans mon formulaire de tel sorte que lors de l authentification , il verifie par rapport a la bdd si c est les meme champs je fais une redirection vers page "index.php" sinn qu il reste tjr sur la page de l authen.
je vous colle ce que j ai su faire ,
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
 
<!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=iso-8859-1" />
<title>Untitled Document</title>
<style type="text/css">
<!--
body {
	background-color: #FFFFFF;
}
 
.image{
	background-image:images/text/text1.jpg no repeat;
 
}
.style1 {
	color: #FFFFFF;
	font-weight: bold;
}
-->
</style></head>
 
<body>
<center>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<table width="597" height="276" border="1" class="image">
  <tr>
    <td background="images/text1.jpg" bgcolor="#CCCCCC">
	  <div align="center">
	    <p class="style1">Welcome to Vipeers Player</p>
        <form id="form1" name="form1" method="post" action="index.php">
          <table width="268" border="0">
            <tr>
              <td><span class="style1">login</span></td>
              <td><label>
                <input type="text" name="login" />
              </label></td>
            </tr>
            <tr>
              <td height="45"><span class="style1">password</span></td>
              <td><label>
                <input type="password" name="pass" />
              </label></td>
            </tr>
            <tr>
              <td><label>
                <input type="submit" name="Submit" value="Valider" />
              </label></td>
              <td><label>
                <input type="reset" name="Submit2" value="Annuler" />
              </label></td>
            </tr>
          </table>
        </form>
	  </div>	  </td>
  </tr>
</table>
 
<?php
mysql_connect("localhost", "root", "root");
mysql_select_db("HotPixelGames");
$login = $_POST['login'];
$pass = $_POST['pass'];
 /*
if ($login = Hanane) {
 if {$pass = 852014) {
 
  
 }
else  
{
echo 'Pseudo ou mot de passe erroné !';
}
else  
{
echo 'Pseudo ou mot de passe erroné !';
}
 */
 
?>
 
</center>
</body>
</html>
HEEEEEEEEEEEEEEEEELP PLZ