Page 1 sur 1

probleme de redirection apres requete

Posté : 22 mai 2007, 11:29
par bromlecornu
bonjour,

Voici mon code :

ma page ou je rentre mes identifiants

Code : Tout sélectionner

<body> <table width="1024" border="0"> <tr> <td align="center"> <table width="800" height="100" border="0"> <tr> <td><img src="images/baniere.jpg" /></td> </tr> </table><br /> <table width="800" border="0"> <tr> <td> <form action="connexion.php" method="post"> <table width="300" border="0"> <tr> <td width="300" align="center">Login</td> </tr> <tr> <td width="300" height="28" align="center"><input name="login" type="text" /></td> </tr> <tr> <td width="300" align="center">Password</td> </tr> <tr> <td width="300" align="center"><input name="pass" type="password" /></td> </tr> </table> <br /> <table width="300" border="0"> <tr> <td width="300" align="center"><input name="entrer" type="submit" value="Connexion" /></td> </form> </tr> </table> </td> </tr> </table> </td> </tr> </table> </body>
La page qui verifie les id

Code : Tout sélectionner

<?php include('connexion.inc'); if (isset($_POST['login']) && isset($_POST['pass'])) { // test des l'existances des variables $sqlQuery = "Select COUNT(*) FROM users WHERE login_user = '".mysql_real_escape_string($_POST['login'])."' AND pass_user = '".mysql_real_escape_string($_POST['pass'])."'"; $result = mysql_query($sqlQuery); $array = mysql_fetch_row($result); if($array[0] == 1) { header("Location: accueil.php"); } else { header("Location: index.php"); } } ?>
Tout va bien pour les tests sauf que quand je rentre les bons id ça ne m'envoi pas sur accueil.php mais sur connexion.php

Merci de votre aide

Posté : 22 mai 2007, 12:32
par jojolapine
et à quoi ressemble ta page accueil.php?

Posté : 22 mai 2007, 14:04
par bromlecornu
elle n'est pas encore faites mais dans le lien on voit bien que ca ne renvoi pas dessus

Posté : 22 mai 2007, 15:51
par jojolapine
dans quel lien?