bonsoir à tous,
je débute en php et je suis entr1 de créer mon premier site mais j'ai un probleme
lorsque un utilisateur veux s'identifier .lorsque en appuie sur le boutton connexion aucun msg ne s'affiche ni pour confirmer la reusite ni l'echec au contraire c le fichier index.php qui s'enregistre a chaque fois que j'appuis sur ce boutton c bizar n'est pas
voila le code de index.php et de accueil.htmlsachant que inscription nom de base de donnees et formulaire_inscri nom de table
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 <?php mysql_connect("localhost", "root", ""); mysql_select_db("inscription"); $login = $_POST["login"]; $mdp = $_POST["pass"]; if ($login != "" && $mdp != "") { $sql="SELECT * from formulaire_inscri WHERE login='$login' AND pass='$mdp';"; $resultat = mysql_query($sql) or die(mysql_error()); if (mysql_num_rows($resultat)<1) echo "Authentification non réussie."; else echo "<script>window.location='./recherhce.html'</script>"; } else header("Location: ./"); mysql_close(); ?>
merci d'avance
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 <html> <head> <title>Rawia rent a car-accueil</title> <link href="imageflottante.css" rel="stylesheet" type="text/css"> </head> <body bgcolor="#919191"> <table align="center" width="1071" border="0"> <tr> <td width="1061" height="141" ><img src="../location voiture/utilitaires/bandeau_bas03.jpg" width="1060" height="132" class="imageflottante" alt="imageflottanta" /></td> </tr> <tr> <td height="55"><table width="1058" border="0"> <tr> <td width="268" height="46" align="center" valign="bottom" bgcolor="#990000"><h3><a href="accueil.html" style="color:#666"><em>Accueil</em></a></h3></td> <td width="258" align="center" valign="bottom" bgcolor="#990000"><h3><a href="voiture.html" style="color:#666"><em>Voitures</em></a></h3></td> <td width="245" align="center" valign="bottom" bgcolor="#990000"><h3><a href="recherche.html" style="color:#666"><em>Recherche</em></a></h3></td> <td width="259" align="center" valign="bottom" bgcolor="#990000"><h3><a href="presentation.html" style="color:#666"><em>Presentation</em></a></h3></td> </tr> </table></td> </tr><table width="200" cellspacing="0"> <tr> <td> </td> </tr> <tr> <td> </td> </tr> <tr> <td> </td> </tr> <tr> <td> </td> </tr> </table> </table> <table align="center" width="1074" border="0"> <tr> <td width="177" height="276" bgcolor="#919191"><p style="color:#900"><em><U><strong>Satisfaction client:</strong></U></em></p> <h1><img src="../location voiture/utilitaires/nejma.png" width="14" height="13"><img src="../location voiture/utilitaires/nejma.png" width="14" height="13"><img src="../location voiture/utilitaires/nejma.png" width="14" height="13"><img src="../location voiture/utilitaires/nejma.png" width="14" height="13"><img src="../location voiture/utilitaires/location.png" width="14" height="13"> <em><strong>14749</strong></em><img src="../im1.jpg" width="312" height="243"></h1></td><td width="497"><img src="../../Pictures/assurances-auto-locations-voiture-paye-L-MDpzo9.jpeg" width="493" height="306"></td> <td width="378" align="center" bgcolor="#919191"><blockquote> <h2 style="color:#900"> <em>Connexion á l´espace membre </em><br /> </h2> </blockquote> <form action="index.php" method="POST"> <table width="383" height="89" cellspacing="2" border="0"> <tr> <td width="196" bgcolor="#900" ><blockquote> <h3 style="color:#666"><em>login:</em></h3> </blockquote></td> <td width="181"><input name="login" type="text" value=""> <br /> </td> </tr> <tr> <td bgcolor="#900"><blockquote> <h3 style="color:#666"><em>Mot de passe :</em></h3> </blockquote></td> <td><input type="password" name="pass" ><br /></td> </tr> </table> <input type="submit" name="connexion" value="Connexion"> <a href="inscription.html" ><img src="../../Documents/Downloads/edit-un-stylo-ecrire-icone-6178-64.png" width="64" height="64"></a> </form></td ></tr> </table> <blockquote> <blockquote> <blockquote> <blockquote> <h2 style="color:#900"><em><strong>vous avantages avec notre agence :</strong></em></h2> <p><em><strong>Vous recherchez une location de voiture moins chère ? Avec notre agence, vous n'avez pas la seule assurance d'un prix bas : notre comparateur de prix est certifié par des labels de confiance et reconnu par Auto Plus, Le Figaro, L'Officiel du Net... et de multiples autres journaux et magazines. Vous avez la possibilité de réserver directement sur Internet ou de nous appeler gratuitement. Nos conseillers répondront au mieux à votre demande.</strong></em></p> <h2 style="color:#900"><strong><em>Centre de reservation:</em></strong></h2> <p><em><strong>du lundi au vendredi de 8h00 à 22h00.</strong></em></p> <p><strong><em>le samedi de 9h00 à 22h00 et le dimanche de 10h30 à 19h00.</em></strong></p> </blockquote> </blockquote> </blockquote> </blockquote> </body> </html>
Partager