Bonjour,

J'ai un soucis dans l'envoi de mon formulaire d'identification sur mon site, quand j'envoi, mon serveur apache qui se trouve sur un serveur ubuntu me dit qu'il ne peut pas exécuter ma requête

Code : Sélectionner tout - Visualiser dans une fenêtre à part
$sql = "SELECT nom_user, pass_user FROM users WHERE nom_user = '$login' AND `pass_user`= '$pass'";
Voila mes pages de saisis et d'envoi

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
<?php
DEFINE ('USER', 'root');
DEFINE ('PASSWORD', '');
DEFINE ('HOST', 'localhost');
DEFINE ('DBNAME', 'vincealex');
 
$dbc = @mysql_connect (HOST , USER, PASSWORD);
mysql_select_db (DBNAME);
?>
<!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>Bienvenue chez Vincent & Alexandre</title>
</head>
 
<body bgcolor="#000000">
<table width="100%"><tr><td align="center">
<table cellpadding="0" cellspacing="0">
  <tr>
        <td width="575" height="524" background="images/index_02.png"></td>
  </tr>
</table>
  <table cellpadding="0" cellspacing="0">
      <tr>
 
<form method="post" action="authentification.php" enctype="multipart/form-data">
        <td width="25" height="63" background="images/index_04.gif"></td>
        <td width="101" height="63" background="images/index_05.gif"></td>
        <td width="219" height="63" background="images/index_06.gif"><input type="test" name="login" /></td>
      </tr>
    </table>
    <table cellpadding="0" cellspacing="0">
      <tr>
        <td width="25" height="56" background="images/index_04bis.gif"></td>
        <td width="102" height="56" background="images/index_08.gif"></td>
        <td width="218" height="56" background="images/index_09.gif"><input type="password" name="pass" /></td>
      </tr>
    </table>
    <table cellpadding="0" cellspacing="0">
      <tr>
        <td width="575" height="56" align="center"><input type="submit" src="images/entrer.gif"/></td>
      </tr>
    </table>
  </tr>
</form>
</table>
</td></tr></table>
</body>
</html>
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
<?php
DEFINE ('USER', 'root');
DEFINE ('PASSWORD', '');
DEFINE ('HOST', 'localhost');
DEFINE ('DBNAME', 'vincealex');
 
$dbc = @mysql_connect (HOST , USER, PASSWORD);
mysql_select_db (DBNAME);
 
 
session_start();
 
$login = $_POST['login'];
$pass = $_POST['pass'];
 
 
$sql = "SELECT nom_user, pass_user FROM users WHERE nom_user = '$login' AND `pass_user`= '$pass'";
$result = mysql_query($sql) or die ('Erreur SQL : impossible d\'effectuer la requête :
'.$sql);
         for($i=0;$i<mysql_num_rows($result);$i++)
         {
          $row=mysql_fetch_assoc($result);
if($row["nom_user"] = $_POST['login'] && $row["pass_user"] = $_POST['pass'])
{
// Nous avons bien le bon utilisateur
// Nous créons la variable de session
$_SESSION['auth']="AUTH : OK";
header("location: accueil.php");
}
elseif ($row["nom_user"] == $_POST['login'] || $row["pass_user"] == $_POST['pass'])
{
// Nous n'avons pas les bonnes informations
// On renvoi vers la page d'authentification
header("location: index.php");
}}
 
?>
merci pour votre aide