Précédent   Forum des professionnels en informatique > PHP > Langage > Sessions
Sessions Forum d'entraide sur les sessions avec PHP. Avant de poster -> FAQ sessions, Cours sessions et Sources sécurité
Partagez cette discussion sur d'autres réseaux sociaux : Viadeo Twitter Google Facebook Digg Delicious MySpace Yahoo
Réponse Proposer ce sujet en actualité
 
Outils de la discussion
Publicité
'
Vieux 30/04/2006, 13h46   #1
Futur Membre du Club
 
Inscription : février 2004
Messages : 148
Détails du profil
Informations forums :
Inscription : février 2004
Messages : 148
Points : 18
Points : 18
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 :
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>
covin85 est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 30/04/2006, 13h50   #2
Futur Membre du Club
 
Inscription : février 2004
Messages : 148
Détails du profil
Informations forums :
Inscription : février 2004
Messages : 148
Points : 18
Points : 18
et voici celui du tableau :


Code :
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
covin85 est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 30/04/2006, 13h58   #3
Membre expérimenté
 
Développeur Web
Inscription : 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 : 538
Points : 538
hello,

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

Code :
1
2
 
 $_SESSION['login']=$pseudo;
que tu affiches ensuite dans ton second script

Code :
1
2
 
<input name="textfield6" type="text" value="<?php echo $_SESSION['login']; ?>">
Pour la team, tu tentes aussi de l'afficher pareillement

Code :
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 :
1
2
 
$_SESSION['team'] = $team;
Voilou
bkill est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 30/04/2006, 14h20   #4
Futur Membre du Club
 
Inscription : février 2004
Messages : 148
Détails du profil
Informations forums :
Inscription : février 2004
Messages : 148
Points : 18
Points : 18
En une fraction de deconde tu as trouvée se que en 3semaine je n'ai pas trouver merci vraiment beaucoup beaucoup beaucoup beaucoup
covin85 est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 30/04/2006, 22h34   #5
Futur Membre du Club
 
Inscription : février 2004
Messages : 148
Détails du profil
Informations forums :
Inscription : février 2004
Messages : 148
Points : 18
Points : 18
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 :
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>
covin85 est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 30/04/2006, 23h15   #6
Membre expérimenté
 
Développeur Web
Inscription : 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 : 538
Points : 538
Apparement, tu as rajouté des variables à cette ligne:

Code :
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 ?
bkill est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 30/04/2006, 23h24   #7
Futur Membre du Club
 
Inscription : février 2004
Messages : 148
Détails du profil
Informations forums :
Inscription : février 2004
Messages : 148
Points : 18
Points : 18
et bien sa marchait comme sa pour "sweb" et "team" je comprend pas
covin85 est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 30/04/2006, 23h28   #8
Futur Membre du Club
 
Inscription : février 2004
Messages : 148
Détails du profil
Informations forums :
Inscription : février 2004
Messages : 148
Points : 18
Points : 18
sa marche !vraiment merci encore ^^
covin85 est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 01/05/2006, 20h52   #9
Futur Membre du Club
 
Inscription : février 2004
Messages : 148
Détails du profil
Informations forums :
Inscription : février 2004
Messages : 148
Points : 18
Points : 18
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
covin85 est déconnecté   Envoyer un message privé Réponse avec citation 00
Réponse Proposer ce sujet en actualité
Outils de la discussion



Fuseau horaire GMT +2. Il est actuellement 03h19.


 
 
 
 
Partenaires

Hébergement Web