Erreur dans script PHP

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

5 réponses

  1. 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 )
    1. 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();

      ?>
      1. non désolé javais oublié de copier coller une partie de la page index.php

        </table>
        </form>
        <p> </p>

        </body>

        </html>
        1. Modérateur
          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.