bonjour :)

je ne peux pas trouver le problème :( quelqu'un peut m'aider s'il vous plaît
voici le code

verification.php

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
<? session_start();?>
<?php
$var1=$_REQUEST['nom']; 
$var2=$_REQUEST['Mot_pass'];
 
$connex=mysql_connect("localhost","root","")or die (" not connect".mysql_error());
$connex_db=mysql_select_db("QCM",$connex) or die (" not selected".mysql_error());
 
/*$reql = "SELECT 'statut' FROM 'personne' "; */
 $res1=mysql_query( "SELECT * FROM personne WHERE nom_per = '$var1' OR mot_de_passe = '$var2'") or die("Erreur SQL !".mysql_error());
 
// on fait une boucle qui va faire un tour pour chaque enregistrement  
  if($var2!=$_POST['Mot_pass'] || $var1!=$_POST['nom'] )
	    include('authentification.php');
 
      else if($res1== "Prof" )
			include("enseignant.html");
		else
            {
			  header("location:etudient.php");
			  exit;
			}
?>
authentification.php

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
 
<? session_start();?>
<!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>authentification</title>
<link href="style.css" rel="stylesheet" type="text/css" />
</head>
 
<body id="accueil">
<!--  top -->
<div id="top">
 <a href="enseignant.php" title='QCM.php'>
 	<img src="3.jpg" height="100" width="200"/>
 </a>
</div>
 
<!--  conatainer -->
<div id="container">
	<!--  left -->
	<div id='left' style="margin-bottom:10px;">
     	<h1 align="center"> Inscrivez vous </h1>
        <form  method='POST' action='<?php print $_SERVER['PHP_SELF']?>'>
           <table class="c1">
              <tr><td>Nom:</td><td><input type='text' name='nom'></tr></td>
              <tr><td>Mot de pass:</td><td><input type='password' name='Mot_pass'></tr></td>	 
           </table>
           <table class="c3">
            <tr><td class="c2"><input type='submit' name='connexion' value='connexion' action="verification.php"></td></tr>
            </table>
        </form>
    </div>
 
</div>
</body>
</html>
lors d'identification : si l'identifiant est un prof ou bien est un eleve a chaque fois l'interface eleve s'execute