neojack | Alors voilà, j'ai utilisé ce code : Code :
- $requete=mysql_db_query($sql_bdd,"insert into membre values (\"$nom_membre\",\"prenom_membre\" )",$db_link) or die(mysql_error());
|
pour faire l'update du profil, mais il me met ce message d'erreur que je capte pas où est l'erreur...
Code :
- Column count doesn't match value count at row 1
|
Pour que vous voyez pleinement, voici le code de la page profil complet...
Code :
- [cpp]
- <head>
- <style>
- BODY{
- scrollbar-face-color:'#0B391C';
- scrollbar-arrow-color:'#FFFFFF';
- scrollbar-track-color:'#0B391C';
- scrollbar-shadow-color:'#FFFFFF';
- scrollbar-highlight-color:'#FFFFFF';
- scrollbar-3dlight-color:'#FFFFFF';
- scrollbar-darkshadow-Color:'#FFFFFF';
- }
- </style>
- <link rel="stylesheet" type="text/css" href="theme/fstyle.css">
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- </head>
- <body bgcolor="0B391B" >
- <?
- require("conf.php" );
- // CONNEXION MYSQL
- $db_link = @mysql_connect($sql_serveur,$sql_user,$sql_passwd);
- if(!$db_link) {echo "Connexion impossible à la base de données <b>$sql_bdd</b> sur le serveur <b>$sql_server</b><br>Vérifiez les paramètres du fichier conf.php3"; exit;}
- // SELECTION DE L'ENREGISTREMENT CONTENANT L'ID EN COURS
- $requete=mysql_db_query($sql_bdd,"select * from membre where id=\"$id\"",$db_link) or die(mysql_error());
- // SI L'ID N'EXISTE PAS
- if(mysql_num_rows($requete)==0)
- {
- // REDIRECTION PAGE ERREUR
- header("Location:$url_erreur" );
- exit;
- }
- // LIGNE FACULTATIVE : RECUPERATION DU PSEUDO
- $pseudo_membre=mysql_result($requete,0,"pseudo" );
- $passe_membre=mysql_result($requete,0,"passe" );
- // CHAMPS SUPLEMENTAIRES
- $requete=mysql_db_query($sql_bdd,"insert into membre values (\"$nom_membre\",\"prenom_membre\" )",$db_link) or die(mysql_error());
- mysql_close($db_link);
- ?>
- <table border='0' cellpadding='0' cellspacing='0' width='915' height='513' align='center'>
-
- <tr>
- <td align="left" valign="top" width="229" rowspan="5" height="513">
- <br>
-
- <table width='200' border='0' cellpadding='0' cellspacing='0'>
- <tr>
- <td background="images/mh.jpg" border="0" width="200" height="30" valign="middle">
- <div align="center"><font class="menu">.:: Menu de navigation ::.</div></font>
- </td>
- </tr>
- <tr>
- <td background='images/mm.jpg'>
- <font class='textnormal'>
- <div align='center'>
- <table width='75%' align='center' border='0'>
- <tr>
- <td width='50%' valign='bottom' align='center'><font class='textnormal'><br><b>Bienvenue</b><br><a class='menulien' href='pbas.php' target='_self'><br>> Accueil <</a><br>
- <a class='menulien' href='histoire.php' target='_self'><br>> Histoire de la troupe <</a><br>
- <a class='menulien' href='membres.php' target='_self'><br>> Membres <</a><br>
- <a class='menulien' href='fede.php' target='_self'><br>> La fédération <</a><br>
- <a class='menulien' href='loi.php' target='_self'><br>> La loi et la promesse<br>scoute <</a><br>
- <a class='menulien' href='calendrier.php' target='_self'><br>> Le calendrier <</a><br>
- <a class='menulien' href='photos.php' target='_self'><br>> Les photos <</a><br>
- <a class='menulien' href='liens.php' target='_self'><br>> Les liens <</a><br>
- </font>
- </td>
- </tr>
- </table>
- </div>
- </font>
- </td>
- </tr>
- <tr>
- <td>
- <img src='images/mb.jpg' border='0' alt='' width="200" height="25"></td>
- </tr>
- </table>
- <table width='200' border='0' cellpadding='0' cellspacing='0'>
- <tr>
- <td background='images/mh.jpg' border='0' width='200' height='29' valign='middle'>
- <div align="center"><font class="menu">.:: Se connecter ::.</div></font>
- </td>
- </tr>
- <tr>
- <td background='images/mm.jpg'>
- <font class='textnormal'>
- <div align="center">
- <br>
- <a class='menulien' href="profil.php?id=<? echo "$id"; ?>" target="_self"> <img src='images/compte.gif' border='0' width="29" height="33"></a>
- <a class='menulien' href="profil.php?id=<? echo "$id"; ?>" target="_self"><br> >
- Mon profil <</a><br><br>
- </div>
- </font>
- </td>
- </tr>
- <tr>
- <td>
- <img src='images/mb.jpg' border='0' alt='' width="200" height="25"></td>
- </tr>
- </table>
- <table width='200' border='0' cellpadding='0' cellspacing='0'>
- <tr>
- <td background='images/mh.jpg' border='0' width='200' height='29' valign='middle'>
- <div align="center"><font class="menu">.:: Infos ::.</div></font>
- </td>
- </tr>
- <tr>
- <td background='images/mm.jpg'>
- <font class='textnormal'>
- <div align='center'>
- </div>
- </font>
- </td>
- </tr>
- <tr>
- <td>
- <img src='images/mb.jpg' border='0' alt='' width="200" height="25"></td>
- </tr>
- </table>
-
-
-
- <td align="left" valign="top" width="596" height="21" colspan="4">
- <td align="left" valign="top" width="90" rowspan="5" height="513">
- <font class='textnormal'><tr>
- <td align="left" valign="top" width="23" height="575">
- <td align="left" valign="top" width="540" height="575">
- <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0 height="156">
- <TR>
- <TD width=23 height=12>
- <img border="0" src="images/bashg.jpg" width="23" height="29"></TD>
- <TD width="100%" background=images/bashm.jpg height=12></TD>
- <TD width=23 height=26>
- <img border="0" src="images/bashd.jpg" width="23" height="29"></TD></TR>
- <TR>
- <TD width=23 background=images/basmg.jpg height="1"></TD>
- <TD width="100%" bgColor=white height="135">
- <DIV align=center style="width: 715; height: 129"><BR>
- <img border="0" src="images/line.gif" width="333" height="9">
-
-
-
-
- <p><font size="2" face="Verdana">Bienvenue dans votre profil,
- c'est ici que vous allez pouvoir modifier vos informations
- personnelles...</font></p>
-
-
-
-
- <table border="0" width="100%">
- <tr>
- <td width="50%" align="right">
- <font face="Verdana" size="2">
- Pseudo :</font></td>
- <td width="50%"><b> <input type="text" name="pseudo_membre" size="45" value="<?php print ("$pseudo_membre" ); ?>">
- </b></td>
- </tr>
- <tr>
- <td width="50%" align="right">
- <font face="Verdana" size="2">
- Mot de passe :</font></td>
- <td width="50%"><b> <input type="text" name="passe_membre" size="45" value="<?php print ("$passe_membre" ); ?>">
- </b></td>
- </tr>
- <tr>
- <td width="50%" align="right">
- <font face="Verdana" size="2">
- Nom :</font></td>
- <td width="50%"><b> <input type="text" name="nom_membre" size="45">
- </b></td>
- </tr>
- <tr>
- <td width="50%" align="right">
- <font face="Verdana" size="2">
- Prénom :</font></td>
- <td width="50%"><b> <input type="text" name="prenom_membre" size="45">
- </b></td>
- </tr>
- <tr>
- <td width="50%" align="right">
- <font face="Verdana" size="2">
- Totem :</font></td>
- <td width="50%"><b> <input type="text" name="totem_membre" size="45">
- </b></td>
- </tr>
- <tr>
- <td width="50%" align="right">
- <font face="Verdana" size="2">
- Email :</font></td>
- <td width="50%"><b> <input type="text" name="email_membre" size="45">
- </b></td>
- </tr>
- <tr>
- <td width="50%" align="right">
- <font face="Verdana" size="2">
- Téléphone :</font></td>
- <td width="50%"><b> <input type="text" name="telephone_membre" size="45">
- </b></td>
- </tr>
- <tr>
- <td width="50%" align="right">
- <font face="Verdana" size="2">
- GSM :</font></td>
- <td width="50%"><b> <input type="text" name="gsm_membre" size="45">
- </b></td>
- </tr>
- <tr>
- <td width="50%" align="right">
- <font face="Verdana" size="2">
- Adresse (rue + numéro) :</font></td>
- <td width="50%"><b> <input type="text" name="rue_membre" size="45">
- </b></td>
- </tr>
- <tr>
- <td width="50%" align="right">
- <font face="Verdana" size="2">
- Code postal :</font></td>
- <td width="50%"><b> <input type="text" name="postal_membre" size="45">
- </b></td>
- </tr>
- <tr>
- <td width="50%" align="right">
- <font face="Verdana" size="2">
- Localité :</font></td>
- <td width="50%"><b> <input type="text" name="localite_membre" size="45">
- </b></td>
- </tr>
- <tr>
- <td width="100%" align="center" colspan="2">
- <form action="profil.php" method="post">
-
- <p style="margin-top: -"> </p>
- <p style="margin-top: -20"><font face="Verdana" size="2">
- <input type="button" value="Valider votre profil" name="valide"></font></p>
- <p style="margin-top: -20"> </p>
- <p style="margin-top: -20">
- <img border="0" src="images/line.gif" width="333" height="9">
-
-
-
-
- </p>
- </td>
- </tr>
- </table>
- </form>
- <p style="margin-top: -; margin-bottom: -"> </DIV></TD></form>
- <TD width=23 background=images/basmd.jpg height="135"></TD></TR>
- <TR>
- <TD width=23 background=basbg.gif height=29>
- <img border="0" src="images/basbg.jpg" width="23" height="29"></TD>
- <TD width="100%" background=images/basgm.jpg height=29></TD>
- <TD width=23 background=basbd.gif
- height=29><img border="0" src="images/basbd.jpg" width="23" height="29"></TD></TR></TABLE>
- <td align="left" valign="top" width="6" height="575">
- </table>
|
|