Bonjour à tous,

voila mon probleme (je suis débutant dans ce langage):

Je souhaite pouvoir me loguer a partir d'une fenetre html (toute simple) dont 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
<html>
<head>
<title>Page d'identification pour l'access а QU@LIPROD</title>
</head>
<body bgcolor="#006699">
<table border=0 cellpadding=0 cellspacing=0 summary="">
<tr>
<td width=124 height=93><a href="bloblo.com"><img src="logo_ft1.gif" border="0" width="123" height="100" alt=""></a></td>
<td align=right width=760 height=93><h1><font color="#ff9933"><b><u><i><big>QU@LIPROD</big></i></u></b></font></h1></td>
<td width=500 height=93 align=right valign=top><a href="blabla.com"><img src="logo_intranoo.bmp" border="0" width="120" height="30" alt=""></a></td>
</tr>
</table><br /><br /><hr size="5" color="red" /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br /><br />
<form name="Form_envoi" action="verification.php" method="post">
<center><table border=0 cellpadding=0 bgcolor=#C0C0C0 summary="">
<tr>
<td colspan=5><font size="5"><b><big><div style="text-align: center">IDENTIFICATION</div></big></b></font></td>
</tr>
<tr>
<td><font size="4"><b>Identifiant :</b></font></td>
<td><input type="text" name="edt_log" size="20" maxlength="50">
</td>
<td><font size="4"><b>Mot de passe :</b></font></td>
<td><input type="password" name="edt_password" size="20" maxlength="50">
</td>
<td width=30></td>
<td><input type="submit" value="VALIDER"></td>
</tr>
</table>
</form>
 
</body>
</html>

j'envoi les information a la page suivante en php qui est sensée me rediriger vers la bonne page suivant le niveau d'access de la personne qui se logue:
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
<?php
session_start();
$mdp = $edt_password;
session_register("mdp");
$conn=mysql_connect("10.141.169.3","Alexandre","mayfair");
// ou mysqlp_connect(...) qui ouvre une connection persistante 
//mais l'inconvénient est que celle-ci se déconnection au bout d'un temps d'inactivité
if (! $conn)
die("impossible de se connecter à mysql");
$database="qualiprod";
mysql_select_db($database,$conn)
or die("impossible d'ouvrir \"$database\" ".mysql_error());
$query="SELECT Niveau_access FROM accessibilite WHERE Mot_de_passe='$mdp'";
$resultat=mysql_query($query,$conn);
$a_row=mysql_fetch_array($resultat);
if ($a_row==0)
{fopen("Page_principale_qualiprod.html","r");}
elseif ($a_row==1)
{fopen("liste_equipe.php","r");}
?>
donc voila je ne sais pas comment faire pour que le script php ouvre la bonne page apres verification du droit d'access (stocké dans une base)

merci d'avance pour les réponses et si c'est pas clair n'hésitez pas à me demander d'éclaircir