2 page similaire, une passe, une passe pas la validation:

voici la page 1 qui marche pas :

erreurs:
there is no attribute "name".

...mpte.php?valid=1" method="post" name="creer1Compte" id="creer1Compte" enctype

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
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" >
<html xmlns="http://www.w3.org/1999/xhtml" lang="fr-FR" >
	<head>
		<title>Portfolios en ligne</title>
		<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
		<meta name="description" content="Creation de portfolio en ligne - Photos et videos" />
		<meta name="keywords" content="portfolio, porfolios, webmaster, developpeur, graphiste, infographiste, artiste, art, arts, photographe, photo, photos, video, videos, creer, creation, creations, galerie, galeries, dembroski, d-spax, despax" /> 
		<meta name="keyphrase" content="portfolios en ligne, portfolio en ligne, creer portfolio, creation de portfolio, galerie d'art, galeries d'arts, galerie de photos, galeries de photos" />
		<meta name="author" content="www.d-spax.com" />
		<meta name="reply-to" content="admin@d-spax.fr" />
		<meta name="robots" content="index, follow" />
		<meta name="revisit-after" content="1 day" />
		<meta name="rating" content="general" />
		<meta name="distribution" content="global" />
		<link href="css/style01.css" rel="stylesheet" type="text/css" />
		<link rel="icon" type="image/gif" href="http://www.d-spax.com/favicon.ico" />
		<script type="text/javascript" src="LB/js/prototype.js"></script>
		<script type="text/javascript" src="LB/js/scriptaculous.js?load=effects"></script>
		<script type="text/javascript" src="LB/js/lightbox.js"></script>
		<link rel="stylesheet" href="LB/css/lightbox.css" type="text/css" media="screen" />
		<script type="text/JavaScript">
                function reset_contact(action){
                        if(action == 'blanc'){
                                document.getElementById('mail').value='';
                                document.getElementById('password').value='';
                        }
                }
                function reset_recherche(action){
                        if(action == 'blanc'){
                                document.getElementById('word').value='';
                        }
                }
<!--
 
var ext = "vide" ;
 
function recup_extension(fichier) // fonction de récupération extension fichier
   {
         if (fichier!="")// si le champ fihier n'est pas vide
         {
            nom_fichier=fichier;// on récupere le chemin complet du fichier
            nbchar = nom_fichier.length;// on compte le nombre de caractere que compose ce chemin
            extension = nom_fichier.substring(nbchar-4,nbchar); // on récupere les 4 derniers caracteres
            extension=extension.toLowerCase(); //on uniforme les caracteres en minuscules au cas ou cela aurait été écris en majuscule...
            return extension; // on renvoi l'extension vers la fonction appelante
         }
   }
 
function verif_extension(fichier)// fonction vérification de l'extension aprés avoir choisi le fichier
   {
   ext = recup_extension(fichier);// on appelle la fonction de récupération de l'extension et on récupere l'extension
   
            if(ext==".jpg"){}// si extension = a une des extension suivante alors tout est ok donc ... pas d'erreur
            else // sinon on alert l'user de la mauvaise extension
            {
                        
               alert("Cette extension n'est pas autorisée .\n\n Seules les extensions suivantes sont autorisées : ' JPG '");
            }
   }
 
function verif_before_valid_form()// fonction de validation de formulaire
   {
    if(ext=="vide")
        {
                        
                
                                alert("Vous n'avez pas choisis de fichier à télécharger ou extension non valide");
        
   }else{
  
      var erreur = 0;// par defaut tout est ok
  
      if(document.creer1Compte.avatar.value!="")// si le champ fihier n'est pas vide
      {
               ext = recup_extension(document.creer1Compte.avatar.value);// on appelle la fonction de récupération de l'extension et on récupere l'extension
               
               if(ext==".jpg"){} // si extension = a une des extension suivante alors tout est ok donc ... pas d'erreur
               else // sinon message d'erreur
               {
                           ext = "vide" ;
                  msgerr="L'extension du fichier n'est pas valide, l'extension acceptée est ' JPG ' .";// prépare message d'erreur
                  erreur = 1;// il y a une erreur donc on l'informe
               }
      }
   
   if(erreur==1)
      {
                
         alert(msgerr);
      }
   else
   {
        if(ext==".jpg")
                {               
                                 ext = "vide" ;
                                window.open("/wait.php", "popup", "height=150,width=400,menubar='no',toolbar='no',location='no',status='no',scrollbars='no'")
                           document.creer1Compte.submit();      
                }
}
}
}
-->
                </script>
	</head>	
	<body>
		<div id="spacework">
			<div id="header"><h2>Actualité sur l'evolution du site :</h2><p>Ce site a pour but de vous permettre d'exposer vos travaux. Les fonctionnalités principales sont en place depuis hier.</p><p>J'ai commencer à coder ce site le Samedi 7 juillet alors ne vous inquietez pas. La mise en forme et le graphisme vont arriver.</p><p>&nbsp;</p><h3>Merci de me signaler tous <a href="contact.php">Bug</a> grace à ce formulaire. Bonne exposition ^^</h3>
			</div>
			<div id="linkage">
				<div style="float: left; width:200px;"><p>&nbsp;</p></div>
				<div style="float: left;">
					<ul id="arbo">
						<li><a href="/index.php?profilActif=<?php echo $_SESSION['profilActif'] ; ?>">&nbsp;Accueil -&nbsp;</a></li>
						<li>Creer un compte</li>
					</ul>
				</div>
			</div>
			<div id="corp">
				<div id="menu">
					<?php
                                        if (!isset($_SESSION['MM_UserGroup'])){
                                        echo ?>
					<p>&nbsp;</p>
					<form id="formConnexion" action="<?php echo $loginFormAction; ?>" method="post">
					<p>&nbsp;</p>
					<p>&nbsp;&nbsp;<input onclick="reset_contact('blanc')" name="mail" id="mail" type="text" value="<?php
                                        if (isset($_GET['erreur'])) {                                   
                                        echo "Erreur";
                                        }else{
                                        echo "Connexion Admin";
                                        }
                                        ?>" size="16" /></p>
					<p>&nbsp;&nbsp;<input name="password" id="password" type="password" value="motdepasse" size="16" />&nbsp;<input name="send" type="submit" value="Go" /></p>
					<p>&nbsp;</p>
				  	</form>
					<p>&nbsp;&nbsp;<a href="mdp.php">mot de passe perdu</a></p>
					<p>&nbsp;</p>
					<h3>&nbsp;&nbsp;<a href="creerCompte.php">Creer un Compte</a></h3>
					<?php
                                        ;
                                        }else{
                                        echo
                                        ?>
					<p>&nbsp;</p>
					<p>&nbsp;&nbsp;Log : <?php echo substr($_SESSION['MM_Username'], 0, 20) ; ?></p>
					<p>&nbsp;</p>
					<ul id="menu-ul">
						<li><a href="ajouterArticle.php">Add Article</a></li>
						<li><a href="AjouterMedia.php">Add Media</a></li>
						<li><a href="modifierArticle.php">Modif Article</a></li>
						<li><a href="modifierMedia.php">Modif Media</a></li><li><a href="modifCompte.php">Modif Compte</a></li><li><a href="modifAvatar.php">Modif Avatar</a></li>
						<li><a href="supprimerArticle.php">Suppr Article</a></li>
						<li><a href="supprimerMedia.php">Suppr Media</a></li><li>Nbre de Comm : <?php echo $totalRows_listerCommProprietaire ; ?></li><li><a href="supprimerCommentaire.php">Suppr Commentaire</a></li>
						<li><a href="<?php echo $logoutAction ?>">Déconnecter</a></li>
					</ul>
					<p>&nbsp;</p>
					&nbsp;&nbsp;&nbsp;<a href="/images/upload/<?php echo $LinkProprietairePourComm ; ?>" title="<?php echo $_SESSION['MM_Username']; ?>" rel="lightbox"><img src="images/upload/miniature/<?php echo $LinkProprietairePourComm ; ?>" alt="Photo" /></a>
					<?php
                                        ;
                                        }
                                        ?>
					<p>&nbsp;</p>
					<p>&nbsp;&nbsp;&nbsp;Tous les Portfolios <a href="portfolios.php?profilActif=<?php echo $_SESSION['profilActif'] ; ?>"><img src="/images/cg/changer.jpg" alt="changer" title="Voir un autre portfolio" /></a></p>
					<p>&nbsp;</p>
					<?php
                                        $requetePactif = "SELECT user_nom, user_prenom, user_mail,user_avatar FROM tabl_user WHERE user_id='". $_SESSION['profilActif'] ."'";
                                        $resultatPactif = mysql_query($requetePactif);
                                        $Pactif = mysql_fetch_assoc($resultatPactif);
                                        $nom=$Pactif['user_nom'];
                                        $prenom=$Pactif['user_prenom'];
                                        $mailActif=$Pactif['user_mail'];
                                        $photoActif=$Pactif['user_avatar'];
                                        ?>
					&nbsp;&nbsp;&nbsp;<a href="/images/upload/<?php echo $photoActif ; ?>" title="<?php echo $mailActif; ?>" rel="lightbox"><img src="images/upload/miniature/<?php echo $photoActif ; ?>" alt="Photo" /></a>
					<a href="/profil.php?profilActif=<?php echo $_SESSION['profilActif']; ?>">
					<?php
                                        echo substr($prenom, 0, 1).". ".substr($nom, 0, 20);
                                        ?></a>
					<p>&nbsp;</p>
					<p>&nbsp;</p>
					<ul id="menu-ul">
                      <?php 
                                          $VerifExist="0";
                                          while ($row_listerCategorie = mysql_fetch_assoc($listerCategorie)) { 
                                                        mysql_select_db($database_root, $root);
                                                        $requeteCateExist = "SELECT cate_id FROM tabl_media WHERE cate_id='". $row_listerCategorie['cate_id'] ."' AND user_id='". $_SESSION['profilActif'] ."'";
                                                        $resultatCateExist = mysql_query($requeteCateExist);
                                                        $exist="0";
                                                        while ($CateExist = mysql_fetch_assoc($resultatCateExist)){
                                                        $exist="1";
                                                        $VerifExist=$VerifExist+$exist;
                                                        };
                                                        if($exist=="1"){
                                                        echo
                                                ?>	
                        <li><a href="listerArticle.php?profilActif=<?php echo $_SESSION['profilActif'] ; ?>&amp;num=<?php echo $row_listerCategorie['cate_id']; ?>"><img src="/images/cg/voir.jpg" alt="voir" title="Voir" /><?php echo $row_listerCategorie['cate_nom']; ?></a></li>
                        <?php 
                                                        ;
                                                        };
                                                } ;
                                                if($VerifExist=="0") echo "&nbsp;&nbsp;0 article d&eacute;pos&eacute;"; ?>
					</ul>
					<p>&nbsp;</p>
					<p>&nbsp;</p>
					<form id="formSearch" method="post" action="resultats.php">
					<p>&nbsp;&nbsp;<input onclick="reset_recherche('blanc')" name="word" id="word" type="text" value="Recherche" size="16" />&nbsp;&nbsp;<input name="sendSearch" type="submit" value="Go" /></p>
				  	</form>
					<object type="application/x-shockwave-flash" data="/images/cg/bonome.swf" width="200" height="220">
			        <param name="movie" value="images/cg/bonome.swf" />
			        <param name="quality" value="high" />
					<param name="wmode" value="transparent" />
					</object>
				</div>
				<div id="content">
					<p>&nbsp;</p>
					<p>&nbsp;</p>
					<?php
                                        if($_SESSION['MailcompteOK']==1){
                                        echo "<== Compte crée, connectez-vous";
                                        $_SESSION['MailcompteOK']=0;
                                        
                                        }else{
                                        echo
                                        ?>
					<br />
					<form action="creerCompte.php?valid=1" method="post" name="creer1Compte" id="creer1Compte" enctype="multipart/form-data">						  				
									<div style="width: 610px;">
										<div style="float: left; width:225px; text-align:right;">
										<span style="color:ff0000; font-size:16px;">*</span> Nom:
										</div>
										<div style="float: left; width:385px; text-align: left;">
						  				<input name="nomCreer" type="text" value="<?php echo $nomValue ; ?>" />
										<span style="color:ff0000; font-size:12px;"><?php echo $nomEcriture ; ?></span>
										</div>
									</div>
									<div style="width: 610px;">
										<div style="float: left; width:225px; text-align:right;">
										<span style="color:ff0000; font-size:16px;">*</span> Prenom:
										</div>
										<div style="float: left; width:385px; text-align: left;">
						  				<input name="prenomCreer" type="text" value="<?php echo $prenomValue ; ?>" />
										<span style="color:ff0000; font-size:12px;"><?php echo $prenomEcriture ; ?></span>
										</div>
									</div>
									<div style="width: 610px;">
										<div style="float: left; width:225px; text-align:right;">
										<span style="color:ff0000; font-size:16px;">*</span> E-mail (Login):
										</div>
										<div style="float: left; width:385px; text-align: left;">
						  				<input name="mailCreer" type="text" value="<?php echo $mailValue ; ?>" />
										<span style="color:ff0000; font-size:12px;"><?php echo $mailEcriture ; ?></span>
										</div>
									</div>
									<div style="width: 610px;">
										<div style="float: left; width:225px; text-align:right;">
										<span style="color:ff0000; font-size:16px;">*</span> Mot de passe:
										</div>
										<div style="float: left; width:385px; text-align: left;">
						  				<input name="passCreer" type="password" value="<?php echo $mdpValue ; ?>" />
										<span style="color:ff0000; font-size:12px;"><?php echo $passEcriture ; ?></span>
										</div>
									</div>
									<div style="width: 610px;">
										<div style="float: left; width:225px; text-align:right;">
										<span style="color:ff0000; font-size:16px;">*</span> Confirmation:
										</div>
										<div style="float: left; width:385px; text-align: left;">
						  				<input name="confirmPassCreer" type="password" value="<?php echo $mdpCfValue ; ?>" />
										<span style="color:ff0000; font-size:12px;"><?php echo $confirmPassEcriture ; ?></span>
										</div>
									</div>
									<div style="width: 610px;">
										<div style="float: left; width:225px; text-align:right;">
										<br />
										</div>
										<div style="float: left; width:385px; text-align: left;">
						  				<br />
										</div>
									</div>													
 
									<div style="width: 610px;">
										<div style="float: left; width:225px; text-align:right;">
										<span style="color:ff0000; font-size:16px;">*</span> Ville:
										</div>
										<div style="float: left; width:385px; text-align: left;">
						  				<input name="villeCreer" type="text" value="<?php echo $villeValue ; ?>" />
										<span style="color:ff0000; font-size:12px;"><?php echo $villeEcriture ; ?></span>
										</div>
									</div>
									<div style="width: 610px;">
										<div style="float: left; width:225px; text-align:right;">
										<span style="color:ff0000; font-size:16px;">*</span> Age:
										</div>
										<div style="float: left; width:385px; text-align: left;">
						  				<input name="ageCreer" type="text" value="<?php echo $ageValue ; ?>" />
										<span style="color:ff0000; font-size:12px;"><?php echo $ageEcriture ; ?></span>
										</div>
									</div>
									<div style="width: 610px;">
										<div style="float: left; width:225px; text-align:right;">
										<span style="color:ff0000; font-size:16px;">*</span> Niveau d'&eacute;tude:
										</div>
										<div style="float: left; width:385px; text-align: left;">
						  				<input name="etudeCreer" type="text" value="<?php echo $etudeValue ; ?>" />
										<span style="color:ff0000; font-size:12px;"><?php echo $etudeEcriture ; ?></span>
										</div>
									</div>
									<div style="width: 610px;">
										<div style="float: left; width:225px; text-align:right;">
										<br />
										</div>
										<div style="float: left; width:385px; text-align: left;">
						  				<br />
										</div>
									</div>
									<div style="width: 610px;">
										<div style="float: left; width:225px; text-align:right;">
										 Description:
										</div>
										<div style="float: left; width:385px; text-align: left;">
										<?php
                                                                                $oFCKeditor = new FCKeditor('descCreer');
                                                                                $oFCKeditor->BasePath = '/FCKeditor/';
                                                                                $oFCKeditor->Value = $descValue ;
                                                                                $oFCKeditor->Create();
                                                                                ?>
										<span style="color:ff0000; font-size:12px;"><?php echo $descEcriture ; ?></span>
										</div>
									</div>
									<div style="width: 610px;">
										<div style="float: left; width:225px; text-align:right;">
										<br />
										</div>
										<div style="float: left; width:385px; text-align: left;">
						  				<br />
										</div>
									</div>
									<div style="width: 610px;">
										<div style="float: left; width:225px; text-align:right;">
										<span style="color:ff0000; font-size:16px;">*</span> Avatar:
										</div>
										<div style="float: left; width:385px; text-align: left;">
						  				<input name="avatar" id="avatar" type="file" onchange="verif_extension(this.value);" />
										<p>&nbsp;</p>
										<p>Inserer un .jpg  ( Maxi 500 Ko )</p>
										</div>
									</div>
									<div style="width: 610px;">
										<div style="float: left; width:225px; text-align:right;">
										<br />
										</div>
										<div style="float: left; width:385px; text-align: left;">
						  				<br />
										</div>
									</div>
									<div style="width: 610px;">
										<div style="float: left; width:225px; text-align:right;">
										<br />
										</div>
										<div style="float: left; width:385px; text-align: left;">
										<input type="button" value="Creer le compte" onclick="verif_before_valid_form(creer1Compte)" /><br />
										( Evitez les accents et apostrophes. Merci )<br />
										( * Champs obligatoires )
										</div>
									</div>
									<div style="width: 610px;">
									<div style="float: left; width:225px; text-align:right;">
										<br />
										</div>
										<div style="float: left; width:385px; text-align: left; color:#ff0000; font-weight:bold; font-size: 16px;">
										<br />
										<?php echo $verif ; ?>
										<?php echo $erreurConnexion ; ?><?php echo $pblmMDP ; ?><?php echo $mailExist ; ?>
										<?php echo $erreurNom ; ?>
										<?php echo $etatDLL ; ?>
										<br /><br />									
										</div>
 
									</div>
					    </form>
						<?php
                                                ;
                                                }
                                                ?>
 
				</div>				
			</div>	
							<script type="text/javascript" >
                                                        window.open("/wait.php?wait=1", "popup", "height=150,width=400,menubar='no',toolbar='no',location='no',status='no',scrollbars='no'")
                                                        </script>
		</div>