Espace membre > Quelques problèmes < Merci de m'aider - Programmation
TomsGuide.com : 700 000 inscrits répondent à toutes vos questions high-tech et informatique.
Pour obtenir de l'aide, inscrivez-vous gratuitement !
 




Mot :   Pseudo :  
 
Bas de page
Auteur
 Sujet : Espace membre > Quelques problèmes < Merci de m'aider
 
Si tu as une envie de travailler, met toi assis et
Profil : IDNaute
Plus d'informations

Salut à tous, j'ai un petit problème avec mon espace membre, alors voilà.

Voici les fichiers qui se trouvent sur mon FTP :

- index.php
- login.php
- verif.php
- config.php
- inscription.php (c'est ici le problème)
- form_inscript.php
- confirm.php

mon ftp

J'ai créer une base de données et j'ai donc aussi créer une table nommée "membre". j'ai mis 6 champ dans cette table :

- id
- nom
- prenom
- email
- pseudo
- mot de passe

Voici le code SQL :

Code :
  1. CREATE TABLE `membre` (
  2. `id` SMALLINT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY,
  3. `nom` TEXT NOT NULL,
  4. `prenom` TEXT NOT NULL,
  5. `email` TEXT NOT NULL,
  6. `pseudo` TEXT NOT NULL,
  7. `mot de passe` TEXT NOT NULL
  8. ) TYPE = MYISAM;



Voici ma BDD (Base de données)

>> Par contre, je ne sais pas quoi mettre dans les champ "fonction" et "valeur"

C'est ici << cliquer <<

Quand je vais sur mon site web, je vais dans la page inscription et là un message d'erreur apparaît :

Code :
  1. Parse error: parse error in /data/members/free/multimania/fr/p/s/p/pspsettings/htdocs/inscription.php on line 12



Voici l'adresse de mon site web : Cliquer ici

Et voici le code source de ma page "inscription.php"

Code :
  1. <HTML>
  2. <HEAD>
  3. <?php
  4. // On include le fichier config.php
  5. include("config.php" );
  6. // On vérifie si tout les champs du formulaire on bien été rempli !
  7. if($send =="ADD" )
  8. {
  9. if(empty($pseudo) or (empty($passe))
  10.     // Si un champ est vide, on envoi un message d'erreur
  11.     echo("Un champ est vide" );
  12.     }
  13.     else // Sinon on passe
  14.     {
  15.     // Maintenant, on vas vérifier si un membre a déjà ce pseudo
  16.     $requete = mysql_query("select pseudo from membres where pseudo=\"$pseudo\"" );
  17.     // Nombre d'enregistrements
  18.     $nb = mysql_numrows($requete);
  19.    
  20.     // si il y a plus de 0 enregistrement avec le meme pseudo, on affiche un message d'erreur
  21.     if($nb>0)
  22.           {
  23.           echo("Désolé ce pseudo est déja utilisé par un autre membre" );
  24.           }
  25.           else // sinon on passe
  26.           {
  27.           // maintenant on vas inserer les informations dans la table "membres"
  28.           mysql_query("insert into membre values(\"\",\"$pseudo\",\"$passe\" )" );
  29.           // Puis, on affiche le message de confirmation
  30.           echo("Inscription ok" );
  31.           }
  32.     }
  33. }
  34. // On ferme la connection à la base de donnée
  35. mysql_close();
  36. ?>
  37. <style type="text/css">
  38. <!--
  39. .Style6 {color: #FF0000}
  40. .Style7 {color: #FF8040}
  41. .Style8 {color: #0080FF}
  42. .Style9 {color: #8000FF}
  43. .Style10 {color: #35E31C; }
  44. .Style13 {
  45.     font-weight: bold;
  46.     color: #0080FF;
  47.     font-style: italic;
  48. }
  49. -->
  50. </style>
  51. <BODY BACKGROUND="http://pix.nofrag.com/44/4b/45b0be9271ea21d1ecf1bac91674.jpg">
  52. <TITLE>PspSettings - Inscription -</TITLE>
  53. <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
  54. <meta name="design" content="kitgratos.net">
  55. <style type="text/css">
  56. <!--
  57. .Style1 {color: #0080FF}
  58. .Style2 {color: #FF0000}
  59. .Style3 {
  60.     color: #FF8040;
  61.     font-weight: bold;
  62. }
  63. .Style4 {
  64.     color: #80FF00;
  65.     font-weight: bold;
  66. }
  67. .Style5 {
  68.     color: #0000FF;
  69.     font-weight: bold;
  70. }
  71. .Style6 {
  72.     color: #8000FF;
  73.     font-weight: bold;
  74. }
  75. -->
  76. </style>
  77. </HEAD>
  78. <BODY BGCOLOR=#FFFFFF LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0>
  79. <p align="center"><!-- ImageReady Slices (kit.psd) --><TABLE WIDTH=777 BORDER=0 CELLPADDING=0 CELLSPACING=0 align="center">
  80.     <TR>
  81.         <TD ROWSPAN=3>
  82.             <IMG SRC="file:///C|/Documents and Settings/liuzzo/Bureau/kit31/images/index_01.jpg" WIDTH=250 HEIGHT=104 ALT=""></TD>
  83.         <TD ROWSPAN=3>
  84.             <IMG SRC="file:///C|/Documents and Settings/liuzzo/Bureau/kit31/images/index_02.jpg" WIDTH=37 HEIGHT=104 ALT=""></TD>
  85.         <TD>
  86.             <IMG SRC="file:///C|/Documents and Settings/liuzzo/Bureau/kit31/images/index_03.jpg" WIDTH=468 HEIGHT=33 ALT=""></TD>
  87.         <TD ROWSPAN=3>
  88.             <IMG SRC="file:///C|/Documents and Settings/liuzzo/Bureau/kit31/images/index_04.jpg" WIDTH=22 HEIGHT=104 ALT=""></TD>
  89.     </TR>
  90.     <TR>
  91.         <TD height="60" bgcolor="#A1A5AE"> 
  92.       </TD>
  93.     </TR>
  94.     <TR>
  95.         <TD>
  96.             <IMG SRC="file:///C|/Documents and Settings/liuzzo/Bureau/kit31/images/index_06.jpg" WIDTH=468 HEIGHT=11 ALT=""></TD>
  97.     </TR>
  98.     <TR>
  99.         <TD COLSPAN=4>
  100.             <IMG SRC="file:///C|/Documents and Settings/liuzzo/Bureau/kit31/images/index_07.jpg" WIDTH=777 HEIGHT=32 ALT=""></TD>
  101.     </TR>
  102.     <TR>
  103.         <TD COLSPAN=4 height="37" background="file:///C|/Documents and Settings/liuzzo/Bureau/kit31/images/index_08.jpg">
  104.             <table align="center" cellpadding="0" cellspacing="0">
  105.                 <tr>
  106.                     <td width="87" style="border-right-width:1; border-right-color:rgb(254,252,237); border-right-style:solid;">
  107.                         <p align="center"><a href="http://pspsettings.ifrance.com/index.php">Accueil</a></p>
  108.                   </td>
  109.                     <td width="87" style="border-right-width:1; border-right-color:rgb(254,252,237); border-right-style:solid;">
  110.                         <p align="center">Forum</p>
  111.                     </td>
  112.                     <td width="87" style="border-right-width:1; border-right-color:rgb(254,252,237); border-right-style:solid;">
  113.                         <p align="center">Chat</p>
  114.                     </td>
  115.                     <td width="87" style="border-right-width:1; border-right-color:rgb(254,252,237); border-right-style:solid;">
  116.                         <p align="center">Livre d'or </p>
  117.                     </td>
  118.                     <td width="87" style="border-right-width:1; border-right-color:rgb(254,252,237); border-right-style:none;">
  119.                         <p align="center"><a href="mailto:pspsettings@ifrance.com">Contact</a></p>
  120.                   </td>
  121.                 </tr>
  122.             </table>
  123. </TD>
  124.     </TR>
  125.     <TR>
  126.         <TD COLSPAN=4>
  127.             <font color="#56596D"><IMG SRC="file:///C|/Documents and Settings/liuzzo/Bureau/kit31/images/index_09.jpg" WIDTH=777 HEIGHT=8 ALT=""></font></TD>
  128.     </TR>
  129.     <TR>
  130.         <TD COLSPAN=4>
  131.             <table cellpadding="0" cellspacing="0" width="774" align="center">
  132.                 <tr>
  133.                     <td width="183" style="border-right-width:1; border-right-color:rgb(130,134,146); border-right-style:dashed;">
  134.                         <table align="center" cellpadding="0" cellspacing="0">
  135.                             <tr>
  136.                                 <td width="172" height="255" style="border-bottom-width:1; border-bottom-color:rgb(130,134,146); border-bottom-style:dashed;">
  137.                                   <p><span class="Style2 Style6">Espace PSP</span>  <img src="http://pix.nofrag.com/98/3d/729ab038d7cad3e441114f30ff6b.jpg">
  138.                                     <a href="http://pspsettings.ifrance.com/index.php"><img src="http://img197.imageshack.us/img197/3848/boutonpspnews6qc.jpg"></a>
  139.                                     <img src="http://img197.imageshack.us/img197/8598/boutonpspdossiers3tc.jpg">
  140.                                     <img src="http://img503.imageshack.us/img503/9372/boutonpsptlchargements5vu.jpg">                                <img src="http://img303.imageshack.us/img303/5924/boutonpsptestspreviews6cb.jpg"></p>                                  </td>
  141.                             </tr>
  142.                             <tr>
  143.                                 <td width="172">                        <p align="left"><span style="font-size:9pt;"><font face="Tahoma"><span class="Style2 Style6">Espace PS3</span></font><font face="Tahoma" color="#56596D"><font face="Tahoma" color="#56596D"><font face="Tahoma" color="#56596D"><font face="Tahoma" color="#56596D"><font face="Tahoma" color="#56596D"><font face="Tahoma" color="#56596D"><img src="http://img403.imageshack.us/img403/879/ps37cl.gif"></font></font></font></font></font><img src="http://img422.imageshack.us/img422/6475/boutonps3news3xn.jpg">                                 
  144.                                 <img src="http://img505.imageshack.us/img505/6281/boutonps3dossiers9ev.jpg">                                  <img src="http://img505.imageshack.us/img505/228/boutonps3tlchargements4dp.jpg"><br>
  145.                                 <br>
  146.                               </font></span></p>                                </td>
  147.                             </tr>
  148.                             <tr>
  149.                                 <td width="172">
  150.                                     <p><font color="#56596D"> </font></p>                                </td>
  151.                             </tr>
  152.                         </table>                    </td>
  153.                     <td width="14">
  154.                         <p><font color="#56596D"> </font></p>                    </td>
  155.                   <td width="576"><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  156.                     </head>
  157.                     <body>
  158.                     <tt><span class="Style13"><img src="http://www.yatoula.com/gif/webmaster/webmaster_246.gif">Si vous n'avez pas de comptes c'est ici que vous le creer, Merci et Bon Surf !                    </span></tt>
  159.                     <div align="center">
  160.                       <style type="text/css">
  161. <!--
  162. body,td,th {
  163.     font-family: Arial, Helvetica, sans-serif;
  164.     font-size: 12px;
  165.     color: #000000;
  166.     font-weight: bold;
  167. }
  168. body {
  169.     background-color: #FFFFFF;
  170. }
  171. a {
  172.     font-size: 12px;
  173.     color: #333333;
  174.     font-weight: bold;
  175.     font-style: italic;
  176. }
  177. a:link {
  178.     text-decoration: underline;
  179. }
  180. a:visited {
  181.     text-decoration: underline;
  182.     color: #333333;
  183. }
  184. a:hover {
  185.     text-decoration: none;
  186.     color: #333333;
  187. }
  188. a:active {
  189.     text-decoration: underline;
  190.     color: #333333;
  191. }
  192. -->
  193.                     </style>
  194.                     </div>
  195.                     <p align="center"> </p>
  196. <p align="center"> </p>
  197. <form name="inscription" method="post" action="file:///C|/Documents and Settings/liuzzo/Bureau/kit31/form_inscript.php">
  198.                 <div align="center">
  199.                   <table width="200" border="0" align="center">
  200.                     <tr>
  201.                       <td><div align="center" class="Style2 Style1 Style6"> - Inscription - </div></td>
  202.                     </tr>
  203.                     </table>
  204.                   <table width="400" border="0" align="center">
  205.                     <tr>
  206.                       <td><div align="center" class="Style2 Style6"><strong>Nom : </strong></div></td>
  207.                       <td align="right"><input name="nom" type="text" id="nom"></td>
  208.                     </tr>
  209.                     <tr>
  210.                       <td><div align="center" class="Style3 Style7">Prénom : </div></td>
  211.                       <td align="right"><input name="prenom" type="text" id="prenom"></td>
  212.                     </tr>
  213.                     <tr>
  214.                       <td><div align="center" class="Style4 Style8">Email : </div></td>
  215.                       <td align="right"><input name="email" type="text" id="email"></td>
  216.                     </tr>
  217.                     <tr>
  218.                       <td><div align="center" class="Style5 Style9">Pseudo : </div></td>
  219.                       <td align="right"><input name="pseudo" type="text" id="pseudo"></td>
  220.                     </tr>
  221.                     <tr>
  222.                       <td><div align="center" class="Style10">Mot de passe : </div></td>
  223.                       <td align="right"><input name="pass" type="password" id="pass"></td>
  224.                     </tr>
  225.                     </table>
  226.                   <table width="300" border="0" align="center">
  227.                     <tr>
  228.                       <td>
  229.                         <div align="center">
  230.                           <input type="reset" name="Submit2" value="Effacer">
  231.                         <a href="confirm.php"><input type="submit" name="Submit" value="Envoyer"></a>
  232.                         </div></td>
  233.                     </tr>
  234.                     </table>
  235.                 </div>
  236. </form></td>
  237.                 </tr>
  238.             </table>
  239. </TD>
  240.     </TR>
  241.     <TR>
  242.         <TD COLSPAN=4>
  243.             <font color="#56596D"><IMG SRC="file:///C|/Documents and Settings/liuzzo/Bureau/kit31/images/index_11.jpg" WIDTH=777 HEIGHT=8 ALT=""></font></TD>
  244.     </TR>
  245.     <TR>
  246.         <TD COLSPAN=4 height="37" background="file:///C|/Documents and Settings/liuzzo/Bureau/kit31/images/index_12.jpg">
  247.             <table align="center" cellpadding="0" cellspacing="0">
  248.                 <tr>
  249.                     <td width="87" style="border-right-width:1; border-right-color:rgb(254,252,237); border-right-style:solid;">
  250.                     <p align="center"><a href="mailto:pspsettings@ifrance.com">Contact</a></p>                    </td>
  251.                     <td width="87" style="border-right-width:1; border-right-color:rgb(254,252,237); border-right-style:solid;">
  252.                         <p align="center">Forum</p>                    </td>
  253.                     <td width="87" style="border-right-width:1; border-right-color:rgb(254,252,237); border-right-style:solid;">
  254.                         <p align="center">Chat</p>                    </td>
  255.                     <td width="87" style="border-right-width:1; border-right-color:rgb(254,252,237); border-right-style:solid;">
  256.                         <p align="center">Livre d'or </p>                    </td>
  257.                     <td width="87" style="border-right-width:1; border-right-color:rgb(254,252,237); border-right-style:none;">
  258.                         <p align="center">L'équipe</p>                    </td>
  259.                 </tr>
  260.                 <tr>
  261.                   <td style="border-right-width:1; border-right-color:rgb(254,252,237); border-right-style:solid;"> </td>
  262.                   <td style="border-right-width:1; border-right-color:rgb(254,252,237); border-right-style:solid;"> </td>
  263.                   <td style="border-right-width:1; border-right-color:rgb(254,252,237); border-right-style:solid;"> </td>
  264.                   <td style="border-right-width:1; border-right-color:rgb(254,252,237); border-right-style:solid;"> </td>
  265.                   <td style="border-right-width:1; border-right-color:rgb(254,252,237); border-right-style:none;"> </td>
  266.                 </tr>
  267.             </table>
  268. </TD>
  269.     </TR>
  270.     <TR>
  271.         <TD COLSPAN=4 height="26" background="file:///C|/Documents and Settings/liuzzo/Bureau/kit31/images/index_13.jpg">
  272. <p align="center"><FONT face="Tahoma,Helvetica" color="white"><span style="font-size:8pt;">Copyright © 2006 Pspsettings Tous droits Réservés</span></FONT></p>
  273. </TD>
  274.     </TR>
  275. </TABLE>
  276. <!-- End ImageReady Slices -->
  277. </BODY>
  278. </HTML>



l'image du code source

Je remercis d'avance celui qui résoudra mon problème !

Salutations

Liens sponsorisés


Inscrivez-vous ou connectez-vous pour masquer ceci.

http://127.0.0.1
Profil : IDNaute
Plus d'informations

Ne met rien dans "fonction", c'est utilisé pour des systèmes particuliers (champs de type enum par exemple).
"valeur" est ce que tu veux mettre dans le champ.

Concernant ton erreur php, je pense qu'il te manque un "{" à la fin de la ligne if(empty($pseudo) or (empty($passe))

Si tu as une envie de travailler, met toi assis et
Profil : IDNaute
Plus d'informations

ok , merci je vais essayer !

Si tu as une envie de travailler, met toi assis et
Profil : IDNaute
Plus d'informations

Non l'erreur n'est pas corrigé.

Voici le message d'erreur :

Code :
  1. Parse error: parse error in /data/members/free/multimania/fr/p/s/p/pspsettings/htdocs/inscription.php on line 11



Voici mon code source :

Cliquer ici

Je ne vois pas où est mon erreur.

Merci de m'aider

Si tu as une envie de travailler, met toi assis et
Profil : IDNaute
Plus d'informations

Un petit up, aidez moi svp. Votre aide m'est précieuse.

http://127.0.0.1
Profil : IDNaute
Plus d'informations

tu oublies de fermer une parenthèse à la ligne 10 :)

Si tu as une envie de travailler, met toi assis et
Profil : IDNaute
Plus d'informations

Donc le code juste serait :

Code :
  1. if(empty($pseudo) or (empty($passe):)
  2. {



?

Merci

http://127.0.0.1
Profil : IDNaute
Plus d'informations

Code :
  1. if(empty($pseudo) or (empty($passe)))
  2. {



Compte les parenthèses à la fin:
if ( => 1
or ( => 2
empty( => 3

Si tu as une envie de travailler, met toi assis et
Profil : IDNaute
Plus d'informations

Merci de m'avoir aider mais j'ai un autre problème quaud j'essaie de m'inscrire (je remplis le formulaire) puis j'appuis sur inscription voici le message d'erreur:

Code :
  1. erreur :Unknown column 'confirm' in 'field list'



Merci beaucoup !

http://127.0.0.1
Profil : IDNaute
Plus d'informations