Probleme formulaire

spartacus-mer1 Messages postés 74 Date d'inscription   Statut Membre -  
spartacus-mer1 Messages postés 74 Date d'inscription   Statut Membre -
Bonjour,
j'ai un ptit probleme et je ne sais ps ou
le truk ke je remplie un formulaire d inscription et je ckick sur envoyer . le probleme c ke objet envoye par l formulaire il ne sont ps enregistre dans la table !!!!!!!!!!!!!!!!!!! :(

voila le code ::

<?php
if (isset($_POST['type']))
{
$type=$_POST["Type"];
$sexe=$_POST["Sexe"];
$nom=$_POST["Nom"];
$prenom=$_POST["Prenom"];
$datenessance=$_POST["Datenessance"];
$paye=$_POST["Paye"];
$ville=$_POST["Ville"];
$adress=$_POST["Adress"];
$telephone=$_POST["Telephone"];
$email=$_POST["mail"];
$pseudo=$_POST["lg"];
$pwd=$_POST["motdepass"];
$connection=mysql_connect("localhost","root") or die("mabghatche t connecta");
$bd=mysql_select_db("art",$connection) or die ("pb base donnees");
$sql="insert into utilisateur(Type,Sexe,Nom,Prenom,Datenessance,Paye,Ville,Adress,Telephone,mail,lg,motdepass) values ('$type','$sexe','$nom','$prenom','$datenessance','$paye','$ville','$adress','$telephone','$email','$pseudo','$pwd')";
$query=mysql_query($sql,$connection) or die ("problemme requete a merouane");
}
?>
Configuration: Windows XP
Internet Explorer 6.0

4 réponses

  1. spartacus-mer1 Messages postés 74 Date d'inscription   Statut Membre
     
    moi je pense un probleme base de donne !!!!????
    0
  2. LA JEN
     
    Bien le bonjour à toi spartacus-mer1,

    j'ai moi même aussi plusieurs soucis dans mon formulaire,

    alors je te souhaite de trouver tout comme moi une personne qui pourrait t'aider.

    dans ce message d'encouragement, je te fait ermonter dans la liste :-)

    Bonne chance. :-)
    0
  3. divland Messages postés 215 Statut Membre 13
     
    bonjour,

    pouvez-vous afficher le formulaire qui envoie vers ce script?

    ça pourrait venir de lui,
    merci
    0
    1. spartacus-mer1 Messages postés 74 Date d'inscription   Statut Membre
       
      <form id="form1" name="form1" method="post" action="">
      <table width="19%" border="0" align="left">
      <tr>
      <td background="imag/informations-persos.gif"> </td>
      </tr>
      </table>
      <p> </p>
      <table width="90%" border="0" align="center" bgcolor="#EEEEEE">
      <tr>
      <td width="35%"><div align="left"><strong>Type de compte :</strong></div></td>
      <td width="65%"><div align="left">
      <select name="Type" id="Type">
      <option value="Particulier">Particulier</option>
      <option value="Artiste">Artiste</option>
      </select>
      </div></td>
      </tr>
      </table>
      <table width="90%" border="0" align="center" bgcolor="#EEEEEE">
      <tr>
      <td width="35%"><div align="left"><strong>Sexe :</strong></div></td>
      <td width="65%"><div align="left">
      <select name="Sexe" id="Sexe">
      <option value="Homme">Homme</option>
      <option value="Femme">Femme</option>
      </select>
      </div></td>
      </tr>
      </table>
      <table width="90%" border="0" align="center" bgcolor="#EEEEEE">
      <tr>
      <td width="35%"><div align="left"><strong>Nom :</strong></div></td>
      <td width="65%"><div align="left">
      <input type="text" name="Nom" id="Nom" />
      </div></td>
      </tr>
      </table>
      <table width="90%" border="0" align="center" bgcolor="#EEEEEE">
      <tr>
      <td width="35%"><div align="left"><strong>Prénom :</strong></div></td>
      <td width="65%"><div align="left">
      <input type="text" name="Prenom" id="Prenom" />
      </div></td>
      </tr>
      </table>
      <table width="90%" border="0" align="center" bgcolor="#EEEEEE">
      <tr>
      <td width="35%"><div align="left"><strong>Date de naissance </strong>:</div></td>
      <td width="65%"><div align="left">
      <input name="Datenessance" type="text" id="Datenessance" />
      Annèe </div></td>
      </tr>
      </table>
      <table width="90%" border="0" align="center" bgcolor="#EEEEEE">
      <tr>
      <td width="35%"><div align="left"><strong>Paye :</strong></div></td>
      <td width="15%"><div align="left">
      <select name="Paye" id="Paye">
      <option value="maroc">Maroc</option>
      <option value="france">France</option>
      </select>
      </div></td>
      <td width="10%"><div align="right"><strong>Ville :</strong></div></td>
      <td width="40%"><div align="left">
      <input type="text" name="Ville" id="Ville" />
      </div></td>
      </tr>
      </table>
      <table width="90%" border="0" align="center" bgcolor="#EEEEEE">
      <tr>
      <td width="35%"><div align="left"><strong>Adresse :</strong></div></td>
      <td width="65%"><div align="left">
      <input name="Adress" type="text" id="Adress" size="55" />
      </div></td>
      </tr>
      </table>
      <table width="90%" border="0" align="center" bgcolor="#EEEEEE">
      <tr>
      <td width="35%"><div align="left"><strong>Téléphone :</strong></div></td>
      <td width="65%"><div align="left">
      <input type="text" name="Telephone" id="Telephone" />
      </div></td>
      </tr>
      </table>
      <table width="90%" border="0" align="center" bgcolor="#EEEEEE">
      <tr>
      <td width="35%"><div align="left"><strong>E mail </strong>:</div></td>
      <td width="65%"><div align="left">
      <input type="text" name="mail" id="mail" />
      </div></td>
      </tr>
      </table>
      <table width="25%" border="0" align="left">
      <tr>
      <td background="imag/votre-identification.gif"> </td>
      </tr>
      </table>
      <div align="left"></div>
      <p> </p>
      <table width="90%" border="0" align="center" bgcolor="#eeeeee">
      <tr>
      <td width="35%"><div align="left"><strong>Créez votre Pseudo</strong> :</div></td>
      <td width="65%"><div align="left">
      <input name="lg" type="text" id="lg" />
      </div></td>
      </tr>
      <tr>
      <td><div align="left"><strong>Créez votre mot de passe</strong> :</div></td>
      <td><div align="left"><span class="Style4">
      <input name="motdepass" type="password" id="motdepass" />
      6 caractères minimum</span></div></td>
      </tr>
      </table>
      <table width="100%" border="0">
      <tr>
      <td><div align="center">___________________________________________________________________________________</div></td>
      </tr>
      </table>
      <p align="center">
      <input type="submit" name="enregistrer" id="enregistrer" value="Enregistrer" />
      </p>
      </form>
      0
    2. divland Messages postés 215 Statut Membre 13 > spartacus-mer1 Messages postés 74 Date d'inscription   Statut Membre
       
      re re

      pourquoi des "id"
      dans les :
      <input type="text" name="Nom" id="Nom" />

      =>remplacer par id par value ?
      0
    3. spartacus-mer1 Messages postés 74 Date d'inscription   Statut Membre > divland Messages postés 215 Statut Membre
       
      comme ca ::

      <input name="Nom" type="text" id="Nom" value="Nom" />


      a la place ::

      <input name="Nom" type="text" id="Nom" />
      0
    4. divland Messages postés 215 Statut Membre 13 > spartacus-mer1 Messages postés 74 Date d'inscription   Statut Membre
       
      à quoi sert le id="Nom" ?

      dans

      <input name="Nom" type="text" id="Nom" value="Nom" />

      si ça sert, alors ok,
      <input name="Nom" type="text" id="Nom" value="Nom" /> est bon,


      mais ne pas oublier le T dans le script qui reçoit les infos :

      if (isset($_POST['Type']))

      à la place de

      if (isset($_POST['type']))
      0
    5. spartacus-mer1 Messages postés 74 Date d'inscription   Statut Membre > divland Messages postés 215 Statut Membre
       
      il ne marche ps

      est ce ke possible k il y a probleme dans la base de donne et pas sur l script
      0
  4. divland Messages postés 215 Statut Membre 13
     
    re bonjour,

    dans le script,

    la majuscule T

    if (isset($_POST['Type']))

    à la place de

    if (isset($_POST['type']))

    0