Erreur dans script PHP
Fermé
p0lak
-
16 juin 2004 à 01:27
kilian Messages postés 8732 Date d'inscription vendredi 19 septembre 2003 Statut Modérateur Dernière intervention 5 février 2025 - 17 juin 2004 à 02:05
kilian Messages postés 8732 Date d'inscription vendredi 19 septembre 2003 Statut Modérateur Dernière intervention 5 février 2025 - 17 juin 2004 à 02:05
Salux ;)
J'ai erreur et je sais pas a quoi elle correspond :
Notice: Undefined index: prenom in c:\program files\easyphp1-7\www\verif.php on line 3
Notice: Undefined index: nom in c:\program files\easyphp1-7\www\verif.php on line 4
Notice: Undefined index: telephone in c:\program files\easyphp1-7\www\verif.php on line 5
Notice: Undefined index: email in c:\program files\easyphp1-7\www\verif.php on line 6
J'ai erreur et je sais pas a quoi elle correspond :
Notice: Undefined index: prenom in c:\program files\easyphp1-7\www\verif.php on line 3
Notice: Undefined index: nom in c:\program files\easyphp1-7\www\verif.php on line 4
Notice: Undefined index: telephone in c:\program files\easyphp1-7\www\verif.php on line 5
Notice: Undefined index: email in c:\program files\easyphp1-7\www\verif.php on line 6
A voir également:
- Erreur dans script PHP
- Script vidéo youtube - Guide
- Erreur 0x80070643 - Accueil - Windows
- Erreur 0x80070643 Windows 10 : comment résoudre le problème de la mise à jour KB5001716 - Accueil - Windows
- Microsoft activation script - Accueil - Windows
- Erreur 1001 outlook - Accueil - Bureautique
5 réponses
rucht
Messages postés
248
Date d'inscription
jeudi 27 mai 2004
Statut
Membre
Dernière intervention
18 juillet 2008
1
16 juin 2004 à 11:47
16 juin 2004 à 11:47
je croi que tu aissaye de requpere des varible qui n' ont pas ete transmise a ta page php (
prenom , nom , telephone , email )
si tu veut plus d ' aide donn e ton source ;-)
rucht ( qui veut bien aider mais qui n' est pas devain )
prenom , nom , telephone , email )
si tu veut plus d ' aide donn e ton source ;-)
rucht ( qui veut bien aider mais qui n' est pas devain )
MA PAGE INDEX
<head>
<title>Achetez en toute sécurité</title>
</head>
<body bgcolor="white" text="black" link="blue" vlink="purple" alink="red">
<form name="paiement" action="verif.php" method="post">
<p> &n
bsp; &
nbsp; <img src="hv
bank banniere.JPG" width="500" height="255" border="0" align="middle"></p>
<table width="500" align="center" bordercolordark="#707070" bordercolorlight="silver" border="1">
<tr>
<th width="490" colspan="2" bgcolor="#CCCCCC">
<p align="center">Saisie des informations personnelles</th>
</tr>
<tr>
<th width="117" bgcolor="#CCCCCC"><p><font size="2">Nom : </font></th>
<td width="367">
<p><input type="text" name="nom"></td>
</tr>
<tr>
<th width="117" bgcolor="#CCCCCC"><p><font size="2">Prenom : </font></th>
<td width="367">
<p><input type="text" name="prenom" size="20"></td>
</tr>
<tr>
<th width="117" bgcolor="#CCCCCC"><p><font size="2">Téléphone</font></th>
<td width="367"><p>
<input type="text" name="telephone"></p>
</td>
</tr>
<tr>
<th width="117" bgcolor="#CCCCCC"><p><font size="2">email : </font></th>
<td width="367">
<p><input type="text" name="email"></td>
</tr>
<tr>
<th width="117" bgcolor="#CCCCCC"><p><font size="2">Choix de la carte</font></p>
</th>
<td width="367"> <p align="left"><SELECT NAME="mtype">
<option selected>MasterCard</option>
<option>Visa</option>
<option>CB</option>
</SELECT>
<font size="2"><input type="button" value="Ecrire en sécurité"
onClick="javascript:window.open('Clavier.html','newwindow','height=600,width=280,status=no,toolbar=no,resizable=yes,menubar=n
o')"> </font>
</p>
</td>
</tr>
<tr>
<th width="117" bgcolor="#CCCCCC"><font size="2">Commentaires pour la livraison :</font></th>
<td width="367">
<p align="left"><textarea name="Comment" rows="5" cols="35"></textarea></td>
</tr>
<tr>
<td width="490" align="right" height="24" colspan="2"> <p align="center"><font size="2"><input type="submit""
value="Soumettre"></font></td>
Mon SCRIPT
<?
$prenom = $_POST["prenom"];
$nom = $_POST["nom"];
$telephone = $_POST["telephone"];
$email = $_POST["email"];
$db = mysql_connect('localhost', 'root', '') or die('Erreur de
connexion '.mysql_error());
mysql_select_db('paiement',$db) or die('Erreur de
selection'.mysql_error());
$sql = "INSERT INTO client
VALUES('','$nom','$prenom','$telephone','$email')";
mysql_query($sql) or die('Erreur SQL !'.$sql.'<br>'.mysql_error());
echo 'Vos infos on été ajoutées.';
mysql_close();
?>
<head>
<title>Achetez en toute sécurité</title>
</head>
<body bgcolor="white" text="black" link="blue" vlink="purple" alink="red">
<form name="paiement" action="verif.php" method="post">
<p> &n
bsp; &
nbsp; <img src="hv
bank banniere.JPG" width="500" height="255" border="0" align="middle"></p>
<table width="500" align="center" bordercolordark="#707070" bordercolorlight="silver" border="1">
<tr>
<th width="490" colspan="2" bgcolor="#CCCCCC">
<p align="center">Saisie des informations personnelles</th>
</tr>
<tr>
<th width="117" bgcolor="#CCCCCC"><p><font size="2">Nom : </font></th>
<td width="367">
<p><input type="text" name="nom"></td>
</tr>
<tr>
<th width="117" bgcolor="#CCCCCC"><p><font size="2">Prenom : </font></th>
<td width="367">
<p><input type="text" name="prenom" size="20"></td>
</tr>
<tr>
<th width="117" bgcolor="#CCCCCC"><p><font size="2">Téléphone</font></th>
<td width="367"><p>
<input type="text" name="telephone"></p>
</td>
</tr>
<tr>
<th width="117" bgcolor="#CCCCCC"><p><font size="2">email : </font></th>
<td width="367">
<p><input type="text" name="email"></td>
</tr>
<tr>
<th width="117" bgcolor="#CCCCCC"><p><font size="2">Choix de la carte</font></p>
</th>
<td width="367"> <p align="left"><SELECT NAME="mtype">
<option selected>MasterCard</option>
<option>Visa</option>
<option>CB</option>
</SELECT>
<font size="2"><input type="button" value="Ecrire en sécurité"
onClick="javascript:window.open('Clavier.html','newwindow','height=600,width=280,status=no,toolbar=no,resizable=yes,menubar=n
o')"> </font>
</p>
</td>
</tr>
<tr>
<th width="117" bgcolor="#CCCCCC"><font size="2">Commentaires pour la livraison :</font></th>
<td width="367">
<p align="left"><textarea name="Comment" rows="5" cols="35"></textarea></td>
</tr>
<tr>
<td width="490" align="right" height="24" colspan="2"> <p align="center"><font size="2"><input type="submit""
value="Soumettre"></font></td>
Mon SCRIPT
<?
$prenom = $_POST["prenom"];
$nom = $_POST["nom"];
$telephone = $_POST["telephone"];
$email = $_POST["email"];
$db = mysql_connect('localhost', 'root', '') or die('Erreur de
connexion '.mysql_error());
mysql_select_db('paiement',$db) or die('Erreur de
selection'.mysql_error());
$sql = "INSERT INTO client
VALUES('','$nom','$prenom','$telephone','$email')";
mysql_query($sql) or die('Erreur SQL !'.$sql.'<br>'.mysql_error());
echo 'Vos infos on été ajoutées.';
mysql_close();
?>
kilian
Messages postés
8732
Date d'inscription
vendredi 19 septembre 2003
Statut
Modérateur
Dernière intervention
5 février 2025
1 526
16 juin 2004 à 15:20
16 juin 2004 à 15:20
Salut, tu n'as pas fermé la balise </form>
non désolé javais oublié de copier coller une partie de la page index.php
</table>
</form>
<p> </p>
</body>
</html>
</table>
</form>
<p> </p>
</body>
</html>
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question
kilian
Messages postés
8732
Date d'inscription
vendredi 19 septembre 2003
Statut
Modérateur
Dernière intervention
5 février 2025
1 526
17 juin 2004 à 02:05
17 juin 2004 à 02:05
Bon j'ai essayé ton script chez moi, sans me connecter à la base de donnée, mais en fasant des "echo" pour afficher les variables du formulaire et ça marche, donc.....
Je ne sais pas.
Je ne sais pas.