IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

Langage PHP Discussion :

Affichage données


Sujet :

Langage PHP

  1. #1
    Membre du Club
    Profil pro
    Inscrit en
    Février 2004
    Messages
    149
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Février 2004
    Messages : 149
    Points : 48
    Points
    48
    Par défaut Affichage données
    bonjour
    j'essaye d'afficher dans un tableau des données rentrée par un utilisateur,mais je n'y arrive pas.
    J'arrive seulment a afficher le pseudo de l'utilisateur mais pas son nom de "team".
    La ou devrai s'afficher son nom de "team",rien ne s'affiche,j'ai bien crée la tables membres avec les champ neccessaire,voici mes 2 codes.

    Voici mon code d'inscription de l'utilisateur:

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
     
    <?php require_once('Connections/membres.php'); ?>
    <?php
     
    $sql["serveur"]='mysql.webzzanine.net';
    $sql["login"]='*******';
    $sql["pass"]='******';
    $sql["base"]='teamsseek-membre';
     
    $sql["connect"]=mysql_connect($sql["serveur"],$sql["login"],$sql["pass"])or die ("impossible de se connecter, réessayé plus tard");
    $sql["select_base"]=mysql_select_db($sql["base"],$sql["connect"])or die ("erreur de connexion base");
     
    session_start();
    require 'conf.php';
     
    $erreur=0;
     $team='';
     
    if(isset($_GET['action'],$_POST['passe_membre'],$_POST['confirm_mdp'],$_POST['team']) AND $_POST['passe_membre']===$_POST['confirm_mdp'])
    {
        if(get_magic_quotes_gpc()===1)
        {
            $pseudo=$_POST['pseudo'];
            $passe=$_POST['passe_membre'];
            $team=$_POST['team'];
     
        }
        else
        {
            $pseudo=addslashes($_POST['pseudo']);
            $passe=addslashes($_POST['passe_membre']);
            $team=addslashes($_POST['team']);
        }
     
        if(!trim($pseudo) OR !trim($passe))
        {
            header('location:inscription.php');
            exit;
        }
     
        mysql_connect($mysql_host,$mysql_login,$mysql_passe,$mysql_team) OR die('<p>Connexion impossible à la base de données. Réessayez plus tard.</p>');
     
        mysql_select_db($mysql_base) OR die('<p>sélection impossible</p>');
        $requete=mysql_query('SELECT COUNT(*) FROM membres WHERE pseudo="'.$pseudo.'"') OR die(mysql_error());
     
        $r=mysql_fetch_row($requete);
     
        if($r[0]!=='0')
        {
            mysql_close();
            $erreur=1;
        }
        else
        {
            mysql_query('INSERT INTO membres VALUES("","'.$pseudo.'",md5("'.$passe.'"),"'.$team.'")') OR die(mysql_error());
            $_SESSION['login']=$pseudo;
     
            mysql_close();
            header('location:zonemembre.php');
            exit;
        }
     
    }
        if($erreur===1)
        {
            echo '<p>Ce pseudo existe déjà. Veuillez en choisir un autre</p>';
        }
    ?><style type="text/css">
    <!--
    body,td,th {
        color: #0066FF;
    }
    body {
        background-image: url();
        background-repeat: no-repeat;
        margin-left: 20px;
        margin-top: 20px;
        margin-right: 20px;
        margin-bottom: 20px;
        background-color: #CC33FF;
    }
    -->
    </style>
    <p><b>Inscription au site :</b></p><p>L'inscription est rapide et gratuite. Elle vous permet de bénéficier de multiples avantages.</p>
    <hr />
    <form method="post" action="inscription.php?action=ajout">
    <p><label for="log">Votre login :</label><br />
      <input type="text" name="pseudo" size="20" id="pseudo" />
    </p>
    <p>Votre mot de passe: <br />
        <input type="password" name="passe_membre" size="20" id="mdp" />
    </p>
    <p><label for="cmdp">Confirmez votre mot de passe :</label><br />
    <input type="password" name="confirm_mdp" size="20" id="cmdp" /></p>
    <p>Indiquer le nom de votre team : </p>
    <p><input name="team" type="text" id="team" size="20" />
    &nbsp;</p>
    <p>LvL de votre Team :</p>
    <p>
      <label>
      <select name="select">
        <option>low</option>
        <option>low+</option>
        <option>low++</option>
        <option>Middle</option>
        <option>Middle+</option>
        <option>Middle++</option>
        <option>Hight</option>
        <option>Pro Gamer</option>
      </select>
      </label>
    </p>
    <p>Site Web :</p>
    <p>
      <label>
      <input type="text" name="textfield" />
      </label>
    <p>Serveur :</p>
    <p>
      <label>
      <input type="text" name="textfield2" />
      </label>
    </p>
    <p>Em@il :</p>
    <p>
      <label>
      <input type="text" name="textfield3" />
      </label>
    </p>
    <p>Selectionnez votre jeux :</p>
    <p>
      <label>
      <select name="select2">
        <option>Counter-Strike</option>
        <option>Counter-Strike (Source)</option>
        <option>Day of defeat</option>
        <option selected="selected">------Choisissez-------</option>
      </select>
      </label>
    </p>
    <p>Information sur votre Site :</p>
    <p>
      <label>
      <input type="text" name="textfield4" />
      </label>
    </p>
    <p>&nbsp;</p>
    <p><input type="submit" value="Inscription" /></p>
    </form>

  2. #2
    Membre du Club
    Profil pro
    Inscrit en
    Février 2004
    Messages
    149
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Février 2004
    Messages : 149
    Points : 48
    Points
    48
    Par défaut
    et voici celui du tableau :


    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
    172
    173
    174
    175
    176
    177
    178
    179
    180
    181
    182
    183
    184
    185
    186
    187
    188
    189
    190
    191
    192
    193
    194
    195
    196
    197
    198
    199
    200
    201
    202
    203
    204
    205
    206
    207
    208
    209
    210
    211
    212
    213
    214
    215
    216
    217
    218
    219
    220
    221
    222
    223
    224
    225
    226
    227
    228
    229
    230
    231
    232
    233
    234
    235
    236
    237
    238
    239
    240
    241
    242
    243
    244
    245
    246
    247
    248
    249
    250
    251
    252
    253
    254
    255
    256
    257
    258
    259
    260
    261
    262
    263
    264
    265
    266
    267
    268
    269
    270
    271
    272
    273
    274
    275
    276
    277
    278
    279
    280
    281
    282
    283
    284
    285
    286
     
    <?php
         session_start();
         if(!isset($_SESSION['login']))
         {
                  exit;
          }
          ?>
    <?
     
    $sql["serveur"]='mysql.webzzanine.net';
    $sql["login"]='******';
    $sql["pass"]='*****';
    $sql["base"]='teamsseek-membre';
     
    $sql["connect"]=mysql_connect($sql["serveur"],$sql["login"],$sql["pass"])or die ("impossible de se connecter, réessayé plus tard");
    $sql["select_base"]=mysql_select_db($sql["base"],$sql["connect"])or die ("erreur de connexion base");
    ?>
     
     
    <HTML>
    <HEAD><?php
         session_start();
         if(!isset($_SESSION['login']))
         {
                  exit;
          }
    ?>
    <TITLE>Teams-Seek CSteam</TITLE>
    <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
    <meta name="generator" content="teams-speak">
    <style type="text/css">
    <!--
    .Style1 {
        color: #0000CC;
        font-family: "Times New Roman", Times, serif;
        font-size: 24px;
    }
    .Style9 {font-family: Verdana, Arial, Helvetica, sans-serif; font-weight: bold; font-size: 12px; }
    -->
    </style>
    </HEAD>
     
     
     
     
     
     
     
     
     
    <BODY BGCOLOR=#FFFFFF LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0 background="images/bg.gif">
    <TABLE WIDTH=800 BORDER=0 CELLPADDING=0 CELLSPACING=0 align="center">
        <TR>
            <TD ROWSPAN=4>
                <IMG SRC="images/index_01.jpg" WIDTH=24 HEIGHT=202 ALT=""></TD>
            <TD COLSPAN=2>
                <IMG SRC="images/index_02.jpg" WIDTH=142 HEIGHT=29 ALT=""></TD>
            <TD COLSPAN=4 height="29" background="images/index_03.jpg">
                <p align="center">&nbsp;</p></TD>
            <TD ROWSPAN=4>
                <IMG SRC="images/index_04.jpg" WIDTH=22 HEIGHT=202 ALT=""></TD>
        </TR>
        <TR>
            <TD>
                <IMG SRC="images/index_05.jpg" WIDTH=136 HEIGHT=128 ALT=""></TD>
            <TD COLSPAN=3>
                <IMG SRC="images/index_06.jpg" WIDTH=382 HEIGHT=128 ALT=""></TD>
            <TD COLSPAN=2>
                <IMG SRC="images/index_07.jpg" WIDTH=236 HEIGHT=128 ALT=""></TD>
        </TR>
        <TR>
            <TD COLSPAN=5 height="30" background="images/index_08.jpg">
                <div align="left">
                <table cellpadding="0" cellspacing="0" width="515">
                    <tr>
                        <td width="118" height="15">
                            <p align="center"><span style="font-size:8pt;"><font face="Verdana" color="#474747"><img src="images/btn_fleche.gif" width="8" height="7" border="0"> 
                            Accueil</font></span></p>                    </td>
                        <td width="118" height="15">
                            <p align="center"><span style="font-size:8pt;"><font face="Verdana" color="#474747"><img src="images/btn_fleche.gif" width="8" height="7" border="0"> 
                            Téléchargements</font></span></p>                    </td>
                        <td width="118" height="15">
                            <p align="center"><span style="font-size:8pt;"><font face="Verdana" color="#474747"><img src="images/btn_fleche.gif" width="8" height="7" border="0">&nbsp;Forum</font></span></p>                    </td>
                        <td width="118" height="15">
                            <p align="center"><span style="font-size:8pt;"><font face="Verdana" color="#474747"><img src="images/btn_fleche.gif" width="8" height="7" border="0">&nbsp;Contact</font></span></p>                    </td>
                        <td width="118" height="15">
                            <p align="center"><span style="font-size:8pt;"><font face="Verdana" color="#474747"><img src="images/btn_fleche.gif" width="8" height="7" border="0">&nbsp;Liens</font></span></p>                    </td>
                    </tr>
                </table>
                </div></TD>
            <TD>
                <IMG SRC="images/index_09.jpg" WIDTH=143 HEIGHT=30 ALT=""></TD>
        </TR>
        <TR>
            <TD COLSPAN=6>
                <IMG SRC="images/index_10.jpg" WIDTH=754 HEIGHT=15 ALT=""></TD>
        </TR>
        <TR>
            <TD background="images/index_11.jpg">&nbsp;      </TD>
            <TD COLSPAN=3 background="images/index_12.jpg">
                <table align="center" cellpadding="0" cellspacing="0" width="162">
                    <tr>
                        <td width="160">
                            <p><img src="imgs_menu/1.jpg" width="160" height="39" border="0"></p>                    </td>
                    </tr>
                    <tr>
                        <td width="160">                                    <ul type="circle">
                                            <li><a href="index.html"><span style="font-size:8pt;"><font face="Verdana" color="#474747">Accueil</font></span></a></li>
                                            <li><a href="war.html"><span style="font-size:8pt;"><font face="Verdana" color="#474747">recherche wars</font></span></a></li>
                                            <li><a href="recrutement.html"><span style="font-size:8pt;"><font face="Verdana" color="#474747">recherche recruteurs</font></span></a></li>
                                            <li><a href="cours.html"><span style="font-size:8pt;"><font face="Verdana" color="#474747">cours counter-strike</font></span></a></li>
                                            <li><a href="telechargement.html"><span style="font-size:8pt;"><font face="Verdana" color="#474747">telechargements</font></span></a></li>
                                            <li><a href="inscription.php"><span style="font-size:8pt;"><font face="Verdana" color="#474747">inscription</font></span></a></li>
                                            <li><a href="connexion.php"><span style="font-size:8pt;"><font face="Verdana" color="#474747">conexion</font></span></a></li>
                                        </ul>                    </td>
                    </tr>
                    <tr>
                        <td width="160">
                            <p><font color="#474747"><img src="imgs_menu/menu2.jpg" width="160" height="39" border="0"></font></p>                    </td>
                    </tr>
                    <tr>
                        <td width="160">                                    <ul type="circle">
                                            <li><span style="font-size:8pt;"><font face="Verdana" color="#474747"><a href="mateam.html">Ma team</a></font></span></li>
                                            <li><span style="font-size:8pt;"><font face="Verdana" color="#474747"><a href="addwar.html">poster war</a></font></span></li>
                                            <li><span style="font-size:8pt;"><font face="Verdana" color="#474747">Partenaire3</font></span></li>
                                            <li><span style="font-size:8pt;"><font face="Verdana" color="#474747">Partenaire4</font></span></li>
                                            <li><span style="font-size:8pt;"><font face="Verdana" color="#474747">Partenaire5</font></span></li>
                                            <li><span style="font-size:8pt;"><font face="Verdana" color="#474747">Partenaire6</font></span></li>
                                            <li><span style="font-size:8pt;"><font face="Verdana" color="#474747">Partenaire7</font></span></li>
                                            <li><span style="font-size:8pt;"><font face="Verdana" color="#474747">Partenaire8</font></span></li>
                                        </ul>                    </td>
                    </tr>
              </table></TD>
            <TD COLSPAN=3 background="images/index_13.jpg"><div align="center" class="Style1">Informations sur votre team          </div>
              <table width="599" height="822" border="3" bordercolor="#3366FF" bgcolor="#99CCFF">
                <!--DWLayoutTable-->
                <tr>
                  <td width="262" height="2"></td>
                  <td width="317" rowspan="2"><form name="form1" method="post" action="">
                      <label></label>
                      <input name="textfield62" type="text" value="<?php echo $_SESSION['team']; ?>">
                  </form>
                    </td>
                </tr>
                <tr>
                  <td height="93" valign="top"><p class="Style9">&nbsp;</p>
                      <p class="Style9">Nom de votre Team : </p></td>
                </tr>
                <tr>
                  <td height="84"><span class="Style9">Level de votre Team </span></td>
                  <td><form name="form4" method="post" action="">
                    <label>
                      <select name="select2">
                      </select>
                    </label>
                  </form>              </td>
                </tr>
                <tr>
                  <td height="82"><span class="Style9">Site Web : </span></td>
                  <td><form name="form3" method="post" action="">
                      <label>
                      <input type="text" name="textfield3">
                      </label>
                  </form></td>
                </tr>
                <tr>
                  <td height="84"><span class="Style9">Recrute : </span></td>
                  <td><form name="form5" method="post" action="">
                    <label>
                      <select name="select3">
                      </select>
                    </label>
                  </form>              </td>
                </tr>
                <tr>
                  <td height="73"><span class="Style9">Serveur : </span></td>
                  <td><form name="form6" method="post" action="">
                      <label>
                      <input type="text" name="textfield2">
                      </label>
                  </form></td>
                </tr>
                <tr>
                  <td height="69"><span class="Style9">Email : </span></td>
                  <td><form action="" method="get" name="" id="" onMouseDown="" onMouseUp="textdisa()" onMouseOver="" onMouseMove="textdisa()" onMouseOut="textdisa()" onKeyPress="textdisa()">
                      <label></label>
                      <input name="Input" type="" value="">
                  </form></td>
                </tr>
                <tr>
                  <td height="71"><span class="Style9">Infos sur vous ou votre team: </span></td>
                  <td><form name="form8" method="post" action="">
                      <label></label>
                      <textarea name="textarea" cols="50"></textarea>
                  </form></td>
                </tr>
                <tr>
                  <td height="78"><span class="Style9">Pseudo : </span></td>
                  <td><form name="form1" method="post" action="">
                      <label>
                      <input name="textfield6" type="text" value="<?php echo $_SESSION['login']; ?>">
                      </label>
                  </form></td>
                </tr>
                <tr>
                  <td height="78"><span class="Style9">Nouveaux mot de passe : </span></td>
                  <td><form name="form9" method="post" action="">
                      <label>
                      <input type="text" name="textfield7">
                      </label>
                  </form></td>
                </tr>
                <tr>
                  <td height="78"><span class="Style9">Jeux : </span></td>
                  <td><form name="form2" method="post" action="">
                    <label>
                    <select name="select">
                      <option>Counter-Strike</option>
                      <option>Counter-Strike (Source)</option>
                      <option>Day of defeat</option>
                      <option selected>Choississez</option>
                                    </select>
                    </label>
                  </form>              </td>
                </tr>
              </table>
              <P align="center" style="margin-right:8; margin-left:8;">
              <p>&nbsp;</p> <form method="link" action="modifteam.html">
                <div align="center">
                  <input name="submit" type="submit" value="modifier">
                </div>
              </form>
              <p>&nbsp;</p>
              <p>&nbsp;</p>
              <p>&nbsp;</p>
              <P align="justify" style="margin-right:8; margin-left:8;">
              <P align="justify" style="margin-right:8; margin-left:8;"><span style="font-size:8pt;"><b><span style="font-size:8pt;">
     
                                        </span></b>          <P align="justify" style="margin-right:8; margin-left:8;"><b><span style="font-size:8pt;"><center></center>
     
     
     
    </span></b></P></TD>
            <TD background="images/index_14.jpg">&nbsp;      </TD>
        </TR>
        <TR>
            <TD ROWSPAN=3>
                <IMG SRC="images/index_15.jpg" WIDTH=24 HEIGHT=57 ALT=""></TD>
            <TD COLSPAN=6>
                <IMG SRC="images/index_16.jpg" WIDTH=754 HEIGHT=10 ALT=""></TD>
            <TD ROWSPAN=3>
                <IMG SRC="images/index_17.jpg" WIDTH=22 HEIGHT=57 ALT=""></TD>
        </TR>
        <TR>
            <TD COLSPAN=5 background="images/index_18.jpg">&nbsp;            </TD>
            <TD>
                <a href="http://www.kitgratos.net" target="_blank"><IMG SRC="images/index_19.jpg" BORDER=0 WIDTH=143 HEIGHT=31 ALT=""></a></TD>
        </TR>
        <TR>
            <TD COLSPAN=6>
                <IMG SRC="images/index_20.jpg" WIDTH=754 HEIGHT=16 ALT=""></TD>
        </TR>
        <TR>
            <TD>
                <IMG SRC="images/spacer.gif" WIDTH=24 HEIGHT=1 ALT=""></TD>
            <TD>
                <IMG SRC="images/spacer.gif" WIDTH=136 HEIGHT=1 ALT=""></TD>
            <TD>
                <IMG SRC="images/spacer.gif" WIDTH=6 HEIGHT=1 ALT=""></TD>
            <TD>
                <IMG SRC="images/spacer.gif" WIDTH=19 HEIGHT=1 ALT=""></TD>
            <TD>
                <IMG SRC="images/spacer.gif" WIDTH=357 HEIGHT=1 ALT=""></TD>
            <TD>
                <IMG SRC="images/spacer.gif" WIDTH=93 HEIGHT=1 ALT=""></TD>
            <TD>
                <IMG SRC="images/spacer.gif" WIDTH=143 HEIGHT=1 ALT=""></TD>
            <TD>
                <IMG SRC="images/spacer.gif" WIDTH=22 HEIGHT=1 ALT=""></TD>
        </TR>
    </TABLE>
    </BODY>
    </HTML>
     
    ?>
    Merci

  3. #3
    Membre confirmé
    Profil pro
    Développeur Web
    Inscrit en
    Avril 2006
    Messages
    430
    Détails du profil
    Informations personnelles :
    Localisation : Belgique

    Informations professionnelles :
    Activité : Développeur Web

    Informations forums :
    Inscription : Avril 2006
    Messages : 430
    Points : 557
    Points
    557
    Par défaut
    hello,

    dans ton premier script, tu fais, pour le login:

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
     
     $_SESSION['login']=$pseudo;
    que tu affiches ensuite dans ton second script

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
     
    <input name="textfield6" type="text" value="<?php echo $_SESSION['login']; ?>">
    Pour la team, tu tentes aussi de l'afficher pareillement

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
     
    <input name="textfield62" type="text" value="<?php echo $_SESSION['team']; ?>">
    mais tu n'as pas créé cet index 'team' dans $_SESSION, comme tu l'as fait pour login... Il faut donc que tu aies dans ton premier script:

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
     
    $_SESSION['team'] = $team;
    Voilou

  4. #4
    Membre du Club
    Profil pro
    Inscrit en
    Février 2004
    Messages
    149
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Février 2004
    Messages : 149
    Points : 48
    Points
    48
    Par défaut
    En une fraction de deconde tu as trouvée se que en 3semaine je n'ai pas trouver merci vraiment beaucoup beaucoup beaucoup beaucoup

  5. #5
    Membre du Club
    Profil pro
    Inscrit en
    Février 2004
    Messages
    149
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Février 2004
    Messages : 149
    Points : 48
    Points
    48
    Par défaut
    Avec les mêmes indications,j'ai rajouter un autres champ,aucun probleme sa marchait!
    Mais j'ai rajouter 3 autres champ et la lor de la validation du formullaire sa m'affiche ceci:


    Warning: Wrong parameter count for mysql_connect() in /home/webzzanine/membres/teamsseek/inscription.php on line 64
    Connexion impossible à la base de données. Réessayez plus tard.



    J'ai chercher tout l'après-midi mais je ne vois vraiment pas,voila ma source:




    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
    161
    162
    163
    164
    165
    166
    167
    168
    169
    170
    171
     
    <?php require_once('Connections/membres.php'); ?>
    <?php
     
    $sql["serveur"]='mysql.webzzanine.net';
    $sql["login"]='*****';
    $sql["pass"]='*****';
    $sql["base"]='teamsseek-membre';
     
    $sql["connect"]=mysql_connect($sql["serveur"],$sql["login"],$sql["pass"])or die ("impossible de se connecter, réessayé plus tard");
    $sql["select_base"]=mysql_select_db($sql["base"],$sql["connect"])or die ("erreur de connexion base");
     
    session_start();
    require 'conf.php';
     
    $erreur=0;
     $team='';
     
    if(isset($_GET['action'],$_POST['passe_membre'],$_POST['confirm_mdp'],$_POST['team'],$_POST['sweb'],$_POST['serv'],$_POST['mail'],$_POST['infos']) AND $_POST['passe_membre']===$_POST['confirm_mdp'])
    {
        if(get_magic_quotes_gpc()===1)
        {
            $pseudo=$_POST['pseudo'];
            $passe=$_POST['passe_membre'];
            $team=$_POST['team'];
            $_SESSION['team'] = $team;
            $sweb=$_POST['sweb'];
            $_SESSION['sweb'] = $sweb;
            $serv=$_POST['serv'];
            $_SESSION['serv'] = $serv;        
            $mail=$_POST['mail'];
            $_SESSION['mail'] = $mail;        
            $infos=$_POST['infos'];
            $_SESSION['infos'] = $infos;
     
     
     
     
     
        }
        else
        {
            $pseudo=addslashes($_POST['pseudo']);
            $passe=addslashes($_POST['passe_membre']);
            $team=addslashes($_POST['team']);
            $team=addslashes($_SESSION['team']);
            $sweb=addslashes($_POST['sweb']);
            $sweb=addslashes($_SESSION['sweb']);
            $serv=addslashes($_POST['serv']);
            $serv=addslashes($_SESSION['serv']);        
            $mail=addslashes($_POST['mail']);
            $mail=addslashes($_SESSION['mail']);        
            $infos=addslashes($_POST['infos']);
            $infos=addslashes($_SESSION['infos']);
     
     
        }
     
        if(!trim($pseudo) OR !trim($passe))
        {
            header('location:inscription.php');
            exit;
        }
     
        mysql_connect($mysql_host,$mysql_login,$mysql_passe,$mysql_team,$mysql_sweb,$mysql_serv,$mysql_mail,$mysql_infos) OR die('<p>Connexion impossible à la base de données. Réessayez plus tard.</p>');
     
        mysql_select_db($mysql_base) OR die('<p>sélection impossible</p>');
        $requete=mysql_query('SELECT COUNT(*) FROM membres WHERE pseudo="'.$pseudo.'"') OR die(mysql_error());
     
        $r=mysql_fetch_row($requete);
     
        if($r[0]!=='0')
        {
            mysql_close();
            $erreur=1;
        }
        else
        {
            mysql_query('INSERT INTO membres VALUES("","'.$pseudo.'",md5("'.$passe.'"),"'.$team.'","'.$sweb.'","'.$serv.'","'.$mail.'","'.$infos.'")') OR die(mysql_error());
            $_SESSION['login']=$pseudo;
     
            mysql_close();
            header('location:zonemembre.php');
            exit;
        }
     
    }
        if($erreur===1)
        {
            echo '<p>Ce pseudo existe déjà. Veuillez en choisir un autre</p>';
        }
    ?><style type="text/css">
    <!--
    body,td,th {
        color: #0066FF;
    }
    body {
        background-image: url();
        background-repeat: no-repeat;
        margin-left: 20px;
        margin-top: 20px;
        margin-right: 20px;
        margin-bottom: 20px;
        background-color: #CC33FF;
    }
    -->
    </style>
    <p><b>Inscription au site :</b></p><p>L'inscription est rapide et gratuite. Elle vous permet de bénéficier de multiples avantages.</p>
    <hr />
    <form method="post" action="inscription.php?action=ajout">
    <p><label for="log">Votre login :</label><br />
      <input type="text" name="pseudo" size="20" id="pseudo" />
    </p>
    <p>Votre mot de passe: <br />
        <input type="password" name="passe_membre" size="20" id="mdp" />
    </p>
    <p><label for="cmdp">Confirmez votre mot de passe :</label><br />
    <input type="password" name="confirm_mdp" size="20" id="cmdp" /></p>
    <p>Indiquer le nom de votre team : </p>
    <p><input name="team" type="text" id="team" size="20" />
    &nbsp;</p>
    <p>LvL de votre Team :</p>
    <p>
      <label>
      <select name="select">
        <option>low</option>
        <option>low+</option>
        <option>low++</option>
        <option>Middle</option>
        <option>Middle+</option>
        <option>Middle++</option>
        <option>Hight</option>
        <option>Pro Gamer</option>
      </select>
      </label>
    </p>
    <p>Site Web :</p>
    <p>
      <label>
      <input name="sweb" type="text" id="sweb" size="20" />
      </label>
    <p>Serveur :</p>
    <p>
      <input name="serv" type="text" id="serv" size="20" />
    </p>
    <p>Em@il :</p>
    <p>
      <label>
      <input name="mail" type="text" id="mail" size="20" />
      </label>
    </p>
    <p>Selectionnez votre jeux :</p>
    <p>
      <label>
      <select name="select2">
        <option>Counter-Strike</option>
        <option>Counter-Strike (Source)</option>
        <option>Day of defeat</option>
        <option selected="selected">------Choisissez-------</option>
      </select>
      </label>
    </p>
    <p>Information sur votre Site :</p>
    <p>
      <label>
      <input name="infos" type="text" id="infos" size="20" />
      </label>
    </p>
    <p>&nbsp;</p>
    <p><input type="submit" value="Inscription" /></p>
    </form>

  6. #6
    Membre confirmé
    Profil pro
    Développeur Web
    Inscrit en
    Avril 2006
    Messages
    430
    Détails du profil
    Informations personnelles :
    Localisation : Belgique

    Informations professionnelles :
    Activité : Développeur Web

    Informations forums :
    Inscription : Avril 2006
    Messages : 430
    Points : 557
    Points
    557
    Par défaut
    Apparement, tu as rajouté des variables à cette ligne:

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
     
    mysql_connect($mysql_host,$mysql_login,$mysql_passe,$mysql_team,$mysql_sweb,$mysql_serv,$mysql_mail,$mysql_infos) OR die [...]
    et ca, c'est la ligne de connexion à mysql...
    Donc le $mysql_team, etc n'ont rien à faire là. Mais ils doivent plutot etre dans ta ligne d'INSERT, non ?

  7. #7
    Membre du Club
    Profil pro
    Inscrit en
    Février 2004
    Messages
    149
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Février 2004
    Messages : 149
    Points : 48
    Points
    48
    Par défaut
    et bien sa marchait comme sa pour "sweb" et "team" je comprend pas

  8. #8
    Membre du Club
    Profil pro
    Inscrit en
    Février 2004
    Messages
    149
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Février 2004
    Messages : 149
    Points : 48
    Points
    48
    Par défaut
    sa marche !vraiment merci encore ^^

  9. #9
    Membre du Club
    Profil pro
    Inscrit en
    Février 2004
    Messages
    149
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Février 2004
    Messages : 149
    Points : 48
    Points
    48
    Par défaut
    Je vien de me rendre compte que sa bugs pas male.
    Les erreurs parviennent assez aletoirement.
    -Soit les infos ne s'affiche pas
    -soit elle s'affichent mais se sont celle d'une autres session

    En tout cas le nom de la session est toujours affichée et toujours exacte,et défois tout marche impec

Discussions similaires

  1. [SQL] Moteur de recherche problème affichage donnée dans select
    Par vincedjs dans le forum PHP & Base de données
    Réponses: 9
    Dernier message: 07/04/2006, 20h27
  2. Newbie | affichage donnée d'un formulaire
    Par steve o'steen dans le forum Langage
    Réponses: 5
    Dernier message: 17/03/2006, 10h48
  3. [SQL-Server] Pb affichage données dans tableau
    Par steve o'steen dans le forum PHP & Base de données
    Réponses: 6
    Dernier message: 14/03/2006, 09h29
  4. [débutant] problème affichage données table ds TDBGrid
    Par lidouka dans le forum Composants VCL
    Réponses: 1
    Dernier message: 16/12/2005, 13h50
  5. Affichage Données avec Espace ds Zone Texte
    Par dai.kaioh dans le forum ASP
    Réponses: 2
    Dernier message: 22/02/2005, 16h43

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo