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 :

un formulaire qui ne s'envoi pas


Sujet :

Langage PHP

  1. #1
    Membre régulier
    Inscrit en
    Septembre 2008
    Messages
    204
    Détails du profil
    Informations forums :
    Inscription : Septembre 2008
    Messages : 204
    Points : 77
    Points
    77
    Par défaut un formulaire qui ne s'envoi pas
    voilà ma page php qui contien un bouton "enregistrer" qui a onclick="verifier()"
    mais quand je click sur le bouton il m'affiche "verifier" indefini.
    voilà ma page
    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
     
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>ادخال نقاط الامتحان</title>
     
     
    <?php 
    ini_set("display_errors","on");
    $nom_user=$_POST["nom_user"];
    $passwd_mysql=$_POST["passwd_mysql"];	
    $id_user=$_POST['id_user'];	
    ?>
    <style type="text/css">
    <!--
    .Style2 {color: #003399}
    body {
    	background-color: #004080;
    }
    .Style68 {color: #FFFFFF;
    	font-weight: bold;
    	font-size: 24px;
    }
    .Style69 {
    	color: #FFFFFF;
    	font-size: 36px;
    }
    .Style39 {color: #003399; font-weight: bold; }
    .Style70 {font-weight: bold}
    -->
    </style>
    </head>
    <body>
    /////
     
     
    /////
    <!-- ------------------------------------debut ecrire seulement 1-9 -------------------------------------->
    <script language="JavaScript" src="lib/jquery-1.6.1.min.js" type="text/javascript"></script>
      <script language="JavaScript" type="text/javascript">
     
    	 $('.intni').live('keyup', function () {
          this.value = this.value.replace(/[^ 0-9  ]/g,'');
    	   this.value = this.value.replace(' ','');
        });
    </script>
    <!-- ------------------------------------fin ecrire seulement 1-9 -------------------------------------->
    <?php 
     
     
    if ($_POST) {$ncrefd=$_POST["ncrefd"];}
    $iannee=$_POST["iannee"];
    $annexe='17';
    if ($_POST) {$nom_user=$_POST["nom_user"];}
    //if ($_POST) {$profil=$_POST["profil"];}  
    //echo "nom_user",' : ', $nom_user ,'<br/>';echo "profil",' : ', $profil ,'<br/>';
     
    if ($_POST) {$crefd=$_POST["crefd"];}
    if ($_POST) {$cr=$_POST["cr"];}
    //echo "ncrefd.crefd.cr";echo $ncrefd.$crefd.$cr;echo "ncrefd";echo $ncrefd;
    if (isset($ncrefd)==FALSE)
                  {
    			 ?>
    <script type="text/JavaScript">
    	          //document.location = "index.php";
    			   document.location = "Authentification/index.php";
    </script>
    			 <?php			  
                  }
    include("stand/siege.php");	
     
    include("tamadros.php");
    if (!empty($_POST)) {$code=$_POST["code"];}
    if (!empty($_POST)) {$num_page=$_POST["num_page"];}
     
    if (!empty($_POST)) {$num_insert=$_POST["num_insert"];}
     
    if (!empty($_POST)) {$code= substr($_POST["code"],0,3);}
    if (!empty($_POST)) {$matiere=$_POST["matiere"];}
    if (!empty($_POST)) {$ligne=$_POST["ligne"];}
     
    //if (!empty($_POST)) {$tri=$_POST["tri"];}
    //if ($_POST) {$ordrec=$_POST["ordrec"];}
    if (!empty($_POST)) {$ligne=$_POST["ligne"];}
    ?>
    <p>&nbsp;</p>
    <?php 
     
    if (($_POST['code']!='100') and ($_POST['matiere']!='10')  and $ligne<=$ligne) 
     
    { 
    $passwd_mysql=$_POST["passwd_mysql"];//echo 'passwd_mysql_FORM_not_dev222::'.$passwd_mysql;
    $id_user=$_POST['id_user'];
    include("cnxs.php");
    //$position=$ordrec;   
    $db=mysql_select_db($sclrt.$ncrefd);//$db=mysql_select_db($sclrt.$annexe);          
    if ($db==FALSE)   die("erreur de connexion a la base de donnees  scolarité ");		
    $sql0="SELECT CODE_MAT FROM MAT_CLASSE  WHERE CODE= '$code' AND MATIERE='$matiere'"	;
    $res0=mysql_query($sql0);
    $cod_mat0= mysql_fetch_array($res0);
    mysql_free_result($res0);
    $code_mat=$cod_mat0['CODE_MAT'];
    //echo "code_mat",' : ', $code_mat ,'<br/>';
     
    $i=1;   
    ?>
    <table width="681" align="center">
    <tr bgcolor="#ff00ff">
    <td colspan="4"><div align="center"><span class="Style68">حجز نقاط الامتحان &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php echo "القسم",' : ', $code ;?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php echo "المادة",' : ', $matiere ;?> </span></div></td>
      </tr>
    <tr bgcolor="#ff00ff">
      <td colspan="4"><table width="672" border="0">
        <tr>
          <td width="348"><div align="center" class="Style68"><?php echo   $num_insert;?>: رقم الحجز </div></td>
          <td width="308"><div align="center"><span class="Style68"><?php echo $num_page;?>: رقم الورقة </span></div></td>
        </tr>
      </table></td>
      </tr>
    <tr bgcolor="#ff00ff">
     
    </tr>
    </table>
    <form action="" method="post" name="form1" id="form1"   onSubmit="if (parseFloat(document.getElementById('note_dev<?php echo $i ?>').value) > 20) { alert('La note doit être inférieur ou égal à 20 !'); return false; }">
      <div align="center">
        <table width="659" height="35" border="1" align="center" bgcolor="#E1EAEA">
          <tr>
            <td width="171"><div align="center"><strong>note </a></strong></div></td>
     
            <td width="227"><div align="center"><strong>num&eacute;ro inscription </strong></div></td>
            <td width="118"><div align="center"><strong>ordrec</strong></div></td>
     
          </tr>
     
     
          <?php
    	 $i=1;  $rang=0;?>
     
      <?php 
    for ($i=1; $i<=$ligne; $i++)   
    { 
    //$ordrec=$line["ORDREC"];  
    $rang=$rang+1;
    $rang_1=$rang%2;
     $t=$i+$ligne;    
     $x= $t+$ligne;                
    ?>
    <tr <?php if ($rang_1=='1'){?> bgcolor="#FCE9F2"<?php }?>>
     
    <td width="171"><div align="right"><span class="Style2">
    <input name="note_dev<?php echo $i  ?>" type="text" id="note_dev<?php echo $i  ?>" size="5" maxlength="5"  tabindex="<?php echo $x; ?>"/>
    </span></div></td>
     
    <td width="227"><div align="right">  
      <div align="center">
        <table width="130" border="0" align="center">
          <tr>
            <td><input name="annexe" type="text" id="annexe" style="color: #9900CC; font-weight: bold"  dir="rtl" value="17" <?php echo "disabled" ;?> size="1" maxlength="2"  /></td>
            <td><select name="anneeins<?php echo $i ?>" id="anneeins<?php echo $i ?>" style="color: #9900CC; font-weight: bold"  dir="rtl">
              <option></option>
              <option <?php if (isset($_POST['anneeins'])) {if($_POST['anneeins']==2000) echo "selected";}?>>2000</option>
              <option <?php if (isset($_POST['anneeins'])) {if($_POST['anneeins']==2001) echo "selected";}?>>2001</option>
              <option <?php if (isset($_POST['anneeins'])) {if($_POST['anneeins']==2002) echo "selected";}?>>2002</option>
              <option <?php if (isset($_POST['anneeins'])) {if($_POST['anneeins']==2003) echo "selected";}?>>2003</option>
              <option <?php if (isset($_POST['anneeins'])) {if($_POST['anneeins']==2004) echo "selected";}?>>2004</option>
              <option <?php if (isset($_POST['anneeins'])) {if($_POST['anneeins']==2005) echo "selected";}?>>2005</option>
              <option <?php if (isset($_POST['anneeins'])) {if($_POST['anneeins']==2006) echo "selected";}?>>2006</option>
              <option <?php if (isset($_POST['anneeins'])) {if($_POST['anneeins']==2007) echo "selected";}?>>2007</option>
              <option <?php if (isset($_POST['anneeins'])) {if($_POST['anneeins']==2008) echo "selected";}?>>2008</option>
              <option <?php if (isset($_POST['anneeins'])) {if($_POST['anneeins']==2009) echo "selected";}?>>2009</option>
              <option <?php if (isset($_POST['anneeins'])) {if($_POST['anneeins']==2010) echo "selected";}?>>2010</option>
              <option <?php if (isset($_POST['anneeins'])) {if($_POST['anneeins']==2011) echo "selected";}?>>2011</option>
            </select></td>
            <td><input name="nseq<?php echo $i ?>" type="text" id="nseq<?php echo $i ?>" size="5" maxlength="5" style="color: #9900CC; font-weight: bold" <?php if (isset($_post['nseq'])){?>value="<?php echo $_REQUEST['nseq']; ?>"<?php } ?>  class="intni" tabindex="<?php echo $t; ?>" /></td>
          </tr>
        </table>
      </div>
     </div>
      </td>
    <td width="118"><div align="center"><strong>
      <input name="ordrec<?php echo $i ?>" type="text" id="ordrec<?php echo $i ?>" size="5" maxlength="5" class="intni" tabindex="<?php echo $i ?>"/>
    </strong></div>  </a></td>
     
     
    </tr>
     
     
     <?php
    }
    ?>
        </table>
        <p>
          <input name="crefd" type="hidden" id="crefd" value="<?php echo $crefd;?>" />
          <input name="ncrefd" type="hidden" id="ncrefd" value="<?php echo $ncrefd;?>" />
          <input name="iannee" type="hidden" id="iannee" value="<?php echo $iannee;?>" /> 
          <input name="cr" type="hidden" id="cr" value="<?php echo $cr;?>" />
          <input name="code" type="hidden" id="crefd4" value="<?php echo $code;?>" />
          <input name="code_mat" type="hidden" id="code_mat" value="<?php echo $code_mat;?>" />
          <input name="matiere" type="hidden" id="ncrefd5" value="<?php echo $matiere;?>" />
    	        <input name="ordrec" type="hidden" id="ordrec" value="<?php echo $ordrec;?>" />
     
          <input name="i" type="hidden" id="i" value="<?php echo $i;?>" />
     
     
          <input name="ordrec" type="hidden" id="ordrec" value="<?php echo $ordrec;?>" />
    	        <input name="num_page" type="hidden" id="num_page" value="<?php echo $num_page;?>" />
    				        <input name="num_insert" type="hidden" id="num_insert" value="<?php echo $num_insert;?>" />
     
     
     
          <span class="Style39">
          <input name="nom_user" type="hidden" id="nom_user" value="<?php echo $nom_user; ?>" />
          <input name="passwd_mysql" type="hidden" id="passwd_mysql" value="<?php echo $passwd_mysql; ?>" />
          <input name="id_user" type="hidden" id="id_user" value="<?php echo $id_user; ?>" />
     
          </span>
          <input type="button" name="Submit" value="enregister" onclick= "verifier()"  />
        </p>
      </div>
    </form>
     <div align="center">
       <?php  
     } 
     else 
      {
      ?>
       <span class="Style69"> 
     
       <?php  echo 'هناك  خطأ في  المعطيات ';
      }
      ?>
       </span>
       <script   language="javascript1.3">
     
    function verifier()    
    {
       <?php
     for ($j=1;($j<=$i-1);$j++)   
    { 
    ?>
    if(document.form1.note_dev<?php echo $j ?>.value<0 || document.form1.note_dev<?php echo $j ?>.value>20 || isNaN(document.form1.note_dev<?php echo $j ?>.value)==true)
      {
        alert("entrez la note svp <?php echo $j  ?>");
    	document.form1.note_dev<?php echo $j  ?>.focus();
    	return;
      }
          <?php
    }
    ?>
       <?php
     for ($j=1;($j<=$i-1);$j++)   
    { 
    ?>
    //document.form1.remarque<?php //echo $j;?>.selectedIndex=1;
    //document.form1.remarque<?php //echo $j;?>.disabled=false;
          <?php
    }
    mysql_free_result($res);
    mysql_close();
    ?>
    document.form1.action="upd_not_exa_17_01.php?ncrefd=<?php echo $ncrefd;?>&crefd=<? echo $crefd?>&cr=<? echo $cr?>";
    document.form1.submit();
    }
    //-->
       </script>
    </div>
     <p>&nbsp;</p>
    </body>
    </html>
    Comment résoudre mon problème ?

  2. #2
    Membre émérite
    Avatar de gene69
    Profil pro
    Inscrit en
    Janvier 2006
    Messages
    1 769
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations professionnelles :
    Secteur : High Tech - Produits et services télécom et Internet

    Informations forums :
    Inscription : Janvier 2006
    Messages : 1 769
    Points : 2 446
    Points
    2 446
    Par défaut
    return;
    si tu retournes pas true tu dois bloquer la propagation du formulaire.

  3. #3
    Membre régulier
    Inscrit en
    Septembre 2008
    Messages
    204
    Détails du profil
    Informations forums :
    Inscription : Septembre 2008
    Messages : 204
    Points : 77
    Points
    77
    Par défaut
    merci
    mais voilà ce fichier est presq le meme mais ça marche bien

    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
     
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>ادخال نقاط الامتحان</title>
    <?php 
    $nom_user=$_POST["nom_user"];
    $passwd_mysql=$_POST["passwd_mysql"];	
    $id_user=$_POST['id_user'];	
    ?>
    <style type="text/css">
    <!--
    .Style2 {color: #003399}
    body {
    	background-color: #004080;
    }
    .Style68 {color: #FFFFFF;
    	font-weight: bold;
    	font-size: 24px;
    }
    .Style69 {
    	color: #FFFFFF;
    	font-size: 36px;
    }
    .Style39 {color: #003399; font-weight: bold; }
    .Style70 {font-weight: bold}
    -->
    </style>
    </head>
    <body>
    <?php 
    //include("stand/siege.php");
     
    if ($_POST) {$ncrefd=$_POST["ncrefd"];}
    $iannee=$_POST["iannee"];
    if ($_POST) {$nom_user=$_POST["nom_user"];}
    //if ($_POST) {$profil=$_POST["profil"];}  
    //echo "nom_user",' : ', $nom_user ,'<br/>';echo "profil",' : ', $profil ,'<br/>';
    if ($_POST) {$crefd=$_POST["crefd"];}
    if ($_POST) {$cr=$_POST["cr"];}
    //echo "ncrefd.crefd.cr";echo $ncrefd.$crefd.$cr;echo "ncrefd";echo $ncrefd;
    if (isset($ncrefd)==FALSE)
                  {
    			 ?>
    <script type="text/JavaScript">
    	          //document.location = "index.php";
    			   document.location = "Authentification/index.php";
    </script>
    			 <?php			  
                  }
    //include("stand/siege.php");	   //   
     // include("test_permis_sais.php");
     
    include("tamadros.php");
    if ($_POST) {$code=$_POST["code"];}
    //include("test_permis_sais.php");
    if (!empty($_POST)) {$code=$_POST["code"];}
    if (!empty($_POST)) {$num_page=$_POST["num_page"];}
     
    if (!empty($_POST)) {$num_insert=$_POST["num_insert"];}
     
    if (!empty($_POST)) {$code= substr($_POST["code"],0,3);}
    if (!empty($_POST)) {$matiere=$_POST["matiere"];}
    if (!empty($_POST)) {$ligne=$_POST["ligne"];}
     
     
    if (!empty($_POST)) {$ligne=$_POST["ligne"];}
    echo $num_insert.'</BR>';
    echo $num_page.'</BR>';
    echo $matiere.'</BR>';
    echo $code.'</BR>';
    echo $ligne.'</BR>';
    ?>
    <p>&nbsp;</p>
    <?php 
    if ($code!='100' ) 
    { 
    $passwd_mysql=$_POST["passwd_mysql"];//echo 'passwd_mysql_FORM_not_dev222::'.$passwd_mysql;
    $id_user=$_POST['id_user'];
    include("cnxs.php");
     
    //$position=$ordrec;   
    $db=mysql_select_db($sclrt.$ncrefd);//$db=mysql_select_db($sclrt.$annexe);          
    if ($db==FALSE)   die("erreur de connexion a la base de donnees  scolarité ");		
    $sql0="SELECT CODE_MAT FROM MAT_CLASSE  WHERE CODE= '$code' AND MATIERE='$matiere'"	;
    $res0=mysql_query($sql0);
    $cod_mat0= mysql_fetch_array($res0);
    mysql_free_result($res0);
    $code_mat=$cod_mat0['CODE_MAT'];
    //echo "code_mat",' : ', $code_mat ,'<br/>';
     
     
    $sql="select * from NOTES_".$num_insert." where  CODE=$code and CODE_MAT=$code_mat and NUM_PAGE=$num_page" ;
    //echo $sql;
    $res=mysql_query($sql); 
    if ($res==FALSE)
    {
    echo $sql;
    die(mysql_error());
    }
    $i=1;   
    ?>
    <table width="681" align="center">
    <tr bgcolor="#ff00ff">
    <td colspan="4"><div align="center"><span class="Style68">تحديث  نقاط الامتحان &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php echo "القسم",' : ', $code ;?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php echo "المادة",' : ', $matiere ;?> </span></div></td>
      </tr>
    <tr bgcolor="#ff00ff">
      <td><div align="center"><span class="Style68"><?php echo $num_page?></span></div></td>
    <td><div align="center" class="Style68">رقم الورقة </div></td>
      <td><div align="center"><span class="Style68"><?php echo $num_insert?></span></div></td>
      <td><div align="center" class="Style68">رقم الحجز </div></td>
    </tr>
    </table>
    <form action="" method="post" name="form1" id="form1"   >
      <div align="center">
        <table width="676" height="35" border="1" align="center" bgcolor="#E1EAEA">
          <tr>
            <td width="74"><div align="center"><strong>النقطة </a></strong></div></td>
     
            <td width="207"><div align="center"><strong>رقم التسجيل </a></strong></div></td>
            <td width="77"><div align="center"><strong>الرقم التسلسلي </a></strong></div></td>
          </tr>
          <?php
    	 $i=1;  $rang=0;
    for ($i=1;($line=mysql_fetch_array($res) AND $i<=$ligne); $i++)   
    { 
    $ordrec=$line["ORDREC"]; 
    $anneeins=$line["ANNEEINS"]; 
    $annexe=$line["ANNEXE"]; 
     
    $nseq=$line["NSEQ"]; 
     
    $rang=$rang+1;
    $rang_1=$rang%2;
     
    ?>
    <tr <?php if ($rang_1=='1'){?> bgcolor="#FCE9F2"<?php }?>>
     
    <td width="74"><div align="center"><span class="Style2">
        <input name="note_dev<?php echo $i  ?>" type="text" id="note_dev<?php echo $i  ?>" size="5" maxlength="5"  value="<?php echo $line["NEXAM"];?>"  tabindex="<?php echo $x ?>" />
      </span> </div>  <div align="right"></a></div>
    <td width="207"><div align="right">
      <table width="200" border="1" align="center">
        <tr>
          <td width="55"><input name="annexe" type="text" id="annexe" style="color: #9900CC; font-weight: bold"  dir="rtl" value="17" size="1" maxlength="2"   /></td>
          <td width="61"><select name="anneeins<?php echo $i ?>" id="anneeins<?php echo $i ?>" style="color: #9900CC; font-weight: bold"  dir="rtl">
            <option ></option>
            <option <?php if (isset($anneeins)) {if($anneeins==2000) echo "selected";}?>>2000</option>
            <option <?php if (isset($anneeins)) {if($anneeins==2001) echo "selected";}?>>2001</option>
            <option <?php if (isset($anneeins)) {if($anneeins==2002) echo "selected";}?>>2002</option>
            <option <?php if (isset($anneeins)) {if($anneeins==2003) echo "selected";}?>>2003</option>
            <option <?php if (isset($anneeins)) {if($anneeins==2004) echo "selected";}?>>2004</option>
            <option <?php if (isset($anneeins)) {if($anneeins==2005) echo "selected";}?>>2005</option>
            <option <?php if (isset($anneeins)) {if($anneeins==2006) echo "selected";}?>>2006</option>
            <option <?php if (isset($anneeins)) {if($anneeins==2007) echo "selected";}?>>2007</option>
            <option <?php if (isset($anneeins)) {if($anneeins==2008) echo "selected";}?>>2008</option>
            <option <?php if (isset($anneeins)) {if($anneeins==2009) echo "selected";}?>>2009</option>
            <option <?php if (isset($anneeins)) {if($anneeins==2010) echo "selected";}?>>2010</option>
            <option <?php if (isset($anneeins)) {if($anneeins==2011) echo "selected";}?>>2011</option>
            <option <?php if (isset($anneeins)) {if($anneeins==2012) echo "selected";}?>>2012</option>
            <option <?php if (isset($_POST['anneeins'])) {if($_POST['anneeins']==2012) echo "selected";}?>>2012</option>
          </select></td>
          <td width="62"><input name="nseq<?php echo $i ?>" type="text" id="nseq<?php echo $i ?>" size="5" maxlength="5" style="color: #9900CC; font-weight: bold"  value="<?php echo $nseq ?>" class="intni"  tabindex="<?php echo $t ?>"/></td>
        </tr>
      </table> 
      </div>
      </td>
    <td width="77"><div align="center"><strong><?php //echo  $ordrec ?>
      <input name="ordrec<?php echo $i ?>" type="text" id="ordrec<?php echo $i ?>" size="5" maxlength="5" style="color: #9900CC; font-weight: bold"  value="<?php echo $ordrec ?>" class="intni"  tabindex="<?php echo $t ?>"/>
    </strong></div>  </a></td>
    </tr>
     <?php
    }
    ?>
        </table>
        <p><span class="Style2">
          <input name="crefd" type="hidden" id="crefd" value="<?php echo $crefd;?>" />
          <input name="ncrefd" type="hidden" id="ncrefd" value="<?php echo $ncrefd;?>" />
          <input name="iannee" type="hidden" id="iannee" value="<?php echo $iannee;?>" /> 
          <input name="cr" type="hidden" id="cr" value="<?php echo $cr;?>" />
          <input name="code" type="hidden" id="crefd4" value="<?php echo $code;?>" />
          <input name="code_mat" type="hidden" id="code_mat" value="<?php echo $code_mat;?>" />
          <input name="matiere" type="hidden" id="ncrefd5" value="<?php echo $matiere;?>" />
         <!--<input name="tri" type="hidden" id="tri" value="<?php// echo $tri;?>" />-->
          <input name="i" type="hidden" id="i" value="<?php echo $i;?>" />
          </span>
    	  <span class="Style2">
          <!--<input name="ordrec" type="hidden" id="ordrec" value="<?php //echo $ordrec;?>" />
    			 <input name="anneeeins" type="hidden" id="anneeeins" value="<?php //echo $anneeeins;?>" />
     
    			 <input name="nseq" type="hidden" id="nseq" value="<?php //echo $nseq;?>" />-->
     
          </span>
          <span class="Style39">
    	  	        <input name="annexe" type="hidden" id="annexe" value="<?php echo $annexe;?>" />
    				<input name="ordrec" type="hidden" id="ordrec" value="<?php echo $ordrec;?>" />
    					  	        <input name="num_insert" type="hidden" id="num_insert" value="<?php echo $num_insert;?>" />
     
    					  	        <input name="num_page" type="hidden" id="num_page" value="<?php echo $num_page;?>" />
     
     
          <input name="nom_user" type="hidden" id="nom_user" value="<?php echo $nom_user; ?>" />
          <input name="passwd_mysql" type="hidden" id="passwd_mysql" value="<?php echo $passwd_mysql; ?>" />
          <input name="id_user" type="hidden" id="id_user" value="<?php echo $id_user; ?>" />
          <input name="profil" type="hidden" id="profil" value="<?php echo $profil; ?>" />
          </span>
          <input type="button" name="Submit" value="تسجيل " onclick= "verifier()"  />
        </p>
      </div>
    </form>
     <div align="center">
       <?php  
     } 
     else 
      {
      ?>
       <span class="Style69"> 
       . 
       <?php  echo 'هناك  خطأ في  المعطيات ';
      }
      ?>
       </span>
       <script type="text/JavaScript">
    <!--
    function verifier()    
    {
       <?php
     for ($j=1;($j<=$i-1);$j++)   
    { 
    ?>
    if(document.form1.note_dev<?php echo $j ?>.value<0 || document.form1.note_dev<?php echo $j ?>.value>20 || isNaN(document.form1.note_dev<?php echo $j ?>.value)==true)
      {
        alert("ادخل من فضلك النقطة <?php echo $j  ?>");
    	document.form1.note_dev<?php echo $j  ?>.focus();
    	return;
      }
          <?php
    }
    ?>
       <?php
     for ($j=1;($j<=$i-1);$j++)   
    { 
    ?>
    //document.form1.remarque<?php //echo $j;?>.selectedIndex=1;
    //document.form1.remarque<?php //echo $j;?>.disabled=false;
          <?php
    }
    mysql_free_result($res);
    mysql_close();
    ?>
    document.form1.action="upd_not_exa_17_up.php?ncrefd=<?php echo $ncrefd;?>&crefd=<? echo $crefd?>&cr=<? echo $cr?>";
    document.form1.submit();
    }
    //-->
       </script>
    </div>
     <p>&nbsp;</p>
    </body>
    </html>

Discussions similaires

  1. Formulaire qui ne s'envoie pas
    Par spawns dans le forum Général JavaScript
    Réponses: 13
    Dernier message: 24/12/2008, 10h17
  2. Formulaire qui ne s'envoie pas
    Par ouiouioui dans le forum EDI, CMS, Outils, Scripts et API
    Réponses: 3
    Dernier message: 30/10/2008, 11h00
  3. formulaire qui ne s'envoie pas !
    Par isoman dans le forum Général JavaScript
    Réponses: 3
    Dernier message: 08/05/2008, 00h46
  4. Formulaire qui ne se ferme pas.
    Par Smint dans le forum Access
    Réponses: 7
    Dernier message: 02/06/2006, 10h34
  5. Réponses: 5
    Dernier message: 23/01/2006, 12h31

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