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 :

probleme de formulaire


Sujet :

Langage PHP

  1. #1
    Membre à l'essai
    Profil pro
    Inscrit en
    Mai 2006
    Messages
    95
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mai 2006
    Messages : 95
    Points : 24
    Points
    24
    Par défaut probleme de formulaire
    hello,

    G un gros prob de formulaireet je ne trouve pas l'intrus

    Voici le prob:
    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
    <?php
    $query="SELECT id,brandname FROM cms_shop_brand WHERE id=".$_POST['brandid'];
    $db->query($query);
    $db->next_record();
    $brandname=$db->f(1);
    $brandid=$db->f(0);
     
    if (isset($_SESSION['artid'])){
    	$query="SELECT * FROM cms_shop_model WHERE id=".$_SESSION['artid'];
    	$db->query($query);
    	$db->next_record();
    }	
    $y=2007;$yearlist='';$cy=$db->f('year');
    if (!$cy) $cy=$y;
    while ($y>1961){
    	if ($y==$cy) $sel='selected'; else $sel='';
    	$yearlist.="<option value=\"$y\" $sel>$y</option>";
    	$y--;	
    }
    ?>
    <html><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <link href="../../default.css" rel="stylesheet" type="text/css">
    <link href="<? echo TH_FOLDER.THEME?>/default.css" rel="stylesheet" type="text/css" media="screen"/>
    <script language="JavaScript" type="text/JavaScript">
    function dochange(what){
    document.all.item('changed').value=1;
    document.forms('form1').submit()
    }
    function doadd(){
    document.all.item('changed').value='';
    document.forms('form1').submit()
    }
     
    </script>
    </head><body>
     
    <form action="" method="post" enctype="multipart/form-data" name="form1" target="_self">
      <br>
      <table width="450" border="4" align="center" cellpadding="4" cellspacing="0"  class="frmdlg">
      <tr>
        <td><table width="100%" border="0" cellspacing="0" cellpadding="0"  class="dlgcontent">
              <tr> 
                <td colspan="2" class="formcaption"><? if ($_POST['add_item']) echo 'Nouveau modèle'; else echo 'Modification de modèle'?></td>
              </tr>
              <tr> 
                <td colspan="2" align="center">
                  <? if (($error)||($warning)||($success))  { echo error($error);echo warning($warning);echo success($success); }else {?>
                  <img src="<? echo TH_FOLDER.THEME?>/spacer.gif" width="10" height="10"> 
                  <? } ?>
                </td>
              </tr>
    		<tr>
    		    <td><table width="100%" border="0" cellpadding="0" cellspacing="0" class="dlgcontent">
                    <tr> 
                      <td>Nom&nbsp;de&nbsp;manufacturier:&nbsp;</td>
                      <td><select name="brandid" id="brandid">
                          <? echo $brandlist?></select> </td>
                    </tr>
                    <tr> 
                      <td>Nom&nbsp;de&nbsp;mod&egrave;le:&nbsp;</td>
                      <td><input name="descr" type="text" id="descr" size="22" maxlength="50" value="<? echo $db->f('descr'); ?>"></td>
                    </tr>
                    <tr>
                      <td>Année</td>
                      <td><select name="year" id="year">
    				  <? echo $yearlist?>
                        </select></td>
                    </tr>
    				<tr>
                      <td>Entre-axe</td>
                      <td>
    				   <select name="trax" id="trax">
                                <option value="4x100" <? if ($db->f('trax')=='4x100') echo 'selected'?>>4x100&quot;&nbsp;&nbsp;</option>
                                <option value="4x108" <? if ($db->f('trax')=='4x108') echo 'selected'?>>4x108&quot;&nbsp;&nbsp;</option>
                                <option value="4x110" <? if ($db->f('trax')=='4x110') echo 'selected'?>>4x110&quot;&nbsp;&nbsp;</option>
                                <option value="4x114.3" <? if ($db->f('trax')=='4x114.3') echo 'selected'?>>4x114.3&quot;&nbsp;&nbsp;</option>
                                <option value="5x100" <? if ($db->f('trax')=='5x100') echo 'selected'?>>5x100&quot;&nbsp;&nbsp;</option>
                                <option value="5x108" <? if ($db->f('trax')=='5x108') echo 'selected'?>>5x108&quot;&nbsp;&nbsp;</option>
    							<option value="5x110" <? if ($db->f('trax')=='5x110') echo 'selected'?>>5x110&quot;&nbsp;&nbsp;</option>
    							<option value="5x112" <? if ($db->f('trax')=='5x112') echo 'selected'?>>5x112&quot;&nbsp;&nbsp;</option>
    							<option value="5x114.3" <? if ($db->f('trax')=='5x114.3') echo 'selected'?>>5x114.3&quot;&nbsp;&nbsp;</option>
    							<option value="5x115" <? if ($db->f('trax')=='5x115') echo 'selected'?>>5x115&quot;&nbsp;&nbsp;</option>
    							<option value="5x120" <? if ($db->f('trax')=='5x120') echo 'selected'?>>5x120&quot;&nbsp;&nbsp;</option>
    							<option value="5x127" <? if ($db->f('trax')=='5x127') echo 'selected'?>>5x127&quot;&nbsp;&nbsp;</option>
    							<option value="5x130" <? if ($db->f('trax')=='5x130') echo 'selected'?>>5x130&quot;&nbsp;&nbsp;</option>
    							<option value="5x135" <? if ($db->f('trax')=='5x135') echo 'selected'?>>5x135&quot;&nbsp;&nbsp;</option>
    							<option value="5x139.7" <? if ($db->f('trax')=='5x139.7') echo 'selected'?>>5x139.7&quot;&nbsp;&nbsp;</option>
    							<option value="5x150" <? if ($db->f('trax')=='5x150') echo 'selected'?>>5x150&quot;&nbsp;&nbsp;</option>
    							<option value="6x114.3" <? if ($db->f('trax')=='6x114.3') echo 'selected'?>>6x114.3&quot;&nbsp;&nbsp;</option>
    							<option value="6x115" <? if ($db->f('trax')=='6x115') echo 'selected'?>>6x115&quot;&nbsp;&nbsp;</option>
    							<option value="6x127" <? if ($db->f('trax')=='6x127') echo 'selected'?>>6x127&quot;&nbsp;&nbsp;</option>
    							<option value="6x135" <? if ($db->f('trax')=='6x135') echo 'selected'?>>6x135&quot;&nbsp;&nbsp;</option>
    							<option value="6x139.7" <? if ($db->f('trax')=='6x139.7') echo 'selected'?>>6x139.7&quot;&nbsp;&nbsp;</option>
    							<option value="7x150" <? if ($db->f('trax')=='7x150') echo 'selected'?>>7x150&quot;&nbsp;&nbsp;</option>
    							<option value="8x165" <? if ($db->f('trax')=='8x165') echo 'selected'?>>8x165&quot;&nbsp;&nbsp;</option>
    							<option value="8x165.1" <? if ($db->f('trax')=='8x165.1') echo 'selected'?>>8x165.1&quot;&nbsp;&nbsp;</option>
    							<option value="8x170" <? if ($db->f('trax')=='8x170') echo 'selected'?>>8x170&quot;&nbsp;&nbsp;</option>
                              </select> </td>
                    </tr>
                    <tr> 
                      <td colspan="2"><hr></td>
                    </tr>
                    <tr> 
                      <td colspan="2"><table width="100%" border="0" cellpadding="0" cellspacing="0" class="dlgcontent">
                          <tr> 
                            <td align="center">Centre pneu avant</td>
                          </tr>
                          <tr> 
                            <td><table width="100%" border="0" cellpadding="0" cellspacing="0" class="dlgcontent">
                                <tr> 
                                  <td>X:</td>
                                  <td><input name="x1" type="text" id="x1" value="<? echo $db->f('x1')?>"></td>
                                  <td>Y:</td>
                                  <td><input name="y1" type="text" id="y1" value="<? echo $db->f('y1')?>"></td>
                                  <td>&nbsp;</td>
                                </tr>
                              </table></td>
                          </tr>
                          <tr> 
                            <td align="center">Centre pneu arrière</td>
                          </tr>
                          <tr> 
                            <td><table width="100%" border="0" cellpadding="0" cellspacing="0" class="dlgcontent">
                                <tr> 
                                  <td>X:</td>
                                  <td><input name="x2" type="text" id="x2" value="<? echo $db->f('x2')?>"></td>
                                  <td>Y:</td>
                                  <td><input name="y2" type="text" id="y2" value="<? echo $db->f('y2')?>"></td>
                                  <td>&nbsp;</td>
                                </tr>
                              </table></td>
                          </tr>
                        </table></td>
                    </tr>
                    <tr> 
                      <td colspan="2"><table width="100%" border="0" cellpadding="0" cellspacing="0" class="dlgcontent">
                          <tr> 
                            <td colspan="2" align="center"><u><font color="#FFFFFF">Image 
                              modèle blanc</font></u></td>
                          </tr>
                          <tr> 
                            <td> <? if (isset($_SESSION['artid'])) { ?>
                              <img src="../../images/modeles/th_<? echo strtolower($db->f('pic_white'));?>" border="1"> 
                              <? } ?></td>
                            <td valign="top"> <table width="100%" border="0" cellpadding="0" cellspacing="0" class="dlgcontent">
                                <tr> 
                                  <td>Attacher/remplacer fichier image</td>
                                  <td>&nbsp;</td>
                                  <td>&nbsp;</td>
                                </tr>
                                <tr> 
                                  <td><input name="picwhite" type="file" id="picwhite" size="30"></td>
                                  <td>&nbsp;</td>
                                  <td><input name="do_delwhite" type="submit" size="30"class="flatbtn" id="do_delwhite" value="Effacer" ></td>
                                </tr>
                              </table></td>
                          </tr>
                        </table></td>
                    </tr>
                    <tr> 
                      <td colspan="2"><table width="100%" border="0" cellpadding="0" cellspacing="0" class="dlgcontent">
                          <tr> 
                            <td colspan="2" align="center"><u><font color="#000000">Image 
                              modèle noir</font></u></td>
                          </tr>
                          <tr> 
                            <td> <? if (isset($_SESSION['artid'])) { ?>
                              <img src="../../images/modeles/th_<? echo strtolower($db->f('pic_black'));?>" border="1"> 
                              <? } ?></td>
                            <td valign="top"> <table width="100%" border="0" cellpadding="0" cellspacing="0" class="dlgcontent">
                                <tr> 
                                  <td>Attacher/remplacer fichier image</td>
                                  <td>&nbsp;</td>
                                  <td>&nbsp;</td>
                                </tr>
                                <tr> 
                                  <td><input name="picblack" type="file" id="picblack" size="30"></td>
                                  <td>&nbsp;</td>
                                  <td><input name="do_delblack" type="submit" size="30"class="flatbtn" id="do_delblack" value="Effacer" ></td>
                                </tr>
                              </table></td>
                          </tr>
                        </table></td>
                    </tr>
                    <tr> 
                      <td colspan="2"><table width="100%" border="0" cellpadding="0" cellspacing="0" class="dlgcontent">
                          <tr> 
                            <td colspan="2" align="center"><u><font color="#666666">Image 
                              modèle gris</font></u></td>
                          </tr>
                          <tr> 
                            <td> <? if (isset($_SESSION['artid'])) { ?>
                              <img src="../../images/modeles/th_<? echo strtolower($db->f('pic_grey'));?>" border="1"> 
                              <? } ?></td>
                            <td valign="top"> <table width="100%" border="0" cellpadding="0" cellspacing="0" class="dlgcontent">
                                <tr> 
                                  <td>Attacher/remplacer fichier image</td>
                                  <td>&nbsp;</td>
                                  <td>&nbsp;</td>
                                </tr>
                                <tr> 
                                  <td><input name="picgrey" type="file" id="picgrey" size="30"></td>
                                  <td>&nbsp;</td>
                                  <td><input name="do_delgrey" type="submit" size="30"class="flatbtn" id="do_delgrey" value="Effacer" ></td>
                                </tr>
                              </table></td>
                          </tr>
                        </table></td>
                    </tr>
                    <tr> 
                      <td colspan="2"><table width="100%" border="0" cellpadding="0" cellspacing="0" class="dlgcontent">
                          <tr> 
                            <td colspan="2" align="center"><u><font color="#FF0000">Image 
                              modèle rouge</font></u></td>
                          </tr>
                          <tr> 
                            <td> <? if (isset($_SESSION['artid'])) { ?>
                              <img src="../../images/modeles/th_<? echo strtolower($db->f('pic_red'));?>" border="1"> 
                              <? } ?></td>
                            <td valign="top"> <table width="100%" border="0" cellpadding="0" cellspacing="0" class="dlgcontent">
                                <tr> 
                                  <td>Attacher/remplacer fichier image</td>
                                  <td>&nbsp;</td>
                                  <td>&nbsp;</td>
                                </tr>
                                <tr> 
                                  <td><input name="picred" type="file" id="picred" size="30"></td>
                                  <td>&nbsp;</td>
                                  <td><input name="do_delred" type="submit" size="30"class="flatbtn" id="do_delred" value="Effacer" ></td>
                                </tr>
                              </table></td>
                          </tr>
                        </table></td>
                    </tr>
                    <tr> 
                      <td colspan="2">&nbsp;</td>
                    </tr>
                    <tr> 
                      <td colspan="2"><? echo $detailtable;?></td>
                    </tr>
                  </table></td>
              </tr>
              <tr> 
                <td colspan="2"><div align="center"><img src="<? echo TH_FOLDER.THEME?>/spacer.gif" height="10"></div></td>
              </tr>
              <tr> 
                <td colspan="2"><div align="center">
                     <? if (($_POST['cd_item']) || ($_POST['changed'])) {?>
                    <table border="0" align="center" cellpadding="0" cellspacing="0">
                      <tr> 
                        <!-- add buttons -->
                        <td> 
                          <table class="btnholder">
                            <tr> 
                              <td>
    						  <input name="do_update" type="submit" class="flatbtn" id="do_update" value="  Modifier  "></td>
                            </tr>
                          </table></td>
                        <td>&nbsp;</td>
                        <td><table class="btnholder">
                            <tr> 
                              <td><input name="do_cancel" type="submit" class="flatbtn" id="do_cancel" value="Annuler" ></td>
                            </tr>
                          </table></td>
                      </tr>
                      <!-- end add buttons -->
                    </table>
    				 <? } else {?>
    <table border="0" align="center" cellpadding="0" cellspacing="0">
                      <tr> 
                        <!-- add buttons -->
                        <td><table class="btnholder">
                            <tr> 
                              <td><input name="do_add" type="submit" class="flatbtn" id="do_add" value="  Accepter  " onClick="doadd()"></td>
                            </tr>
                          </table></td>
                        <td>&nbsp;</td>
                        <td><table class="btnholder">
                            <tr> 
                              <td><input name="do_cancel" type="submit" class="flatbtn" id="do_cancel" value="Annuler" ></td>
                            </tr>
                          </table></td>
                      </tr>
                      <!-- end add buttons -->
                    </table>				 
    				 <? }?>
                  </div></td>
              </tr>
              <tr> 
                <td colspan="2"><div align="center"><img src="<? echo PICS?>/spacer.gif" height="10"> 
                  </div></td>
              </tr>
            </table></td>
      </tr>
    </table> 
      <input name="art_id" type="hidden" id="art_id" value="<? echo $db->f('id'); ?>">
      <input name="brand_id" type="hidden" id="brand_id" value="<? echo $brandid; ?>">
      <input name="changed" type="hidden" id="changed" value="0">
    </form>
     
     
    </body>
    </html>
    Merci d'avance

  2. #2
    Membre à l'essai
    Profil pro
    Inscrit en
    Mai 2006
    Messages
    95
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mai 2006
    Messages : 95
    Points : 24
    Points
    24
    Par défaut suite
    le prob c'est que rien s'integre dans la base

  3. #3
    Membre du Club
    Profil pro
    Inscrit en
    Mai 2005
    Messages
    40
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mai 2005
    Messages : 40
    Points : 48
    Points
    48
    Par défaut
    salut
    je n'ai lu que les trois premières lignes avant d'avoir mal à la tête.
    toute ta page est dans ta source?
    si oui, où initialises-tu ta variable $db ?

  4. #4
    Membre à l'essai
    Profil pro
    Inscrit en
    Mai 2006
    Messages
    95
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mai 2006
    Messages : 95
    Points : 24
    Points
    24
    Par défaut suite
    euh ben la c le script du formulaire etant donne que la faute peut etre la je n'ai pas le choix de tout presenter pour la variable DB :
    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
    function models(){
    global $db;
    $db->connect();
    $query="SELECT id,brandname FROM cms_shop_brand ORDER BY brandname";
    $brandlist=get_options($query,false,true,$_POST['brandid']);
    if (($_POST['do_add'])&&($_SESSION['artid'])){ 
    	if ($_FILES['picwhite']['name']) $pictname=handle_file('picwhite','modeles/'); else $pictname="spacer.gif";
    	if ($_FILES['picblack']['name']) $pictname1=handle_file('picblack','modeles/'); else $pictname1="spacer.gif";
    	if ($_FILES['picgrey']['name']) $pictname2=handle_file('picgrey','modeles/'); else $pictname2="spacer.gif";
    	if ($_FILES['picred']['name']) $pictname3=handle_file('picred','modeles/'); else $pictname3="spacer.gif";
     
    	$query="INSERT INTO cms_shop_model(brand_id,descr,trax,year) values(".tosql($_POST['brandid']).",".tosql($_POST['descr']).",".tosql($_POST['trax']).",".tosql($_POST['year']).")";
    	$db->query($query);
    	unset($_SESSION['artid']);
    }
    elseif (($_POST['do_update'])&&($_SESSION['artid'])){
     
    	if ($_FILES['picwhite']['name']) $pictname=handle_file('picwhite','modeles/'); else $pictname="spacer.gif";
    	if ($_FILES['picblack']['name']) $pictname1=handle_file('picblack','modeles/'); else $pictname1="spacer.gif";
    	if ($_FILES['picgrey']['name']) $pictname2=handle_file('picgrey','modeles/'); else $pictname2="spacer.gif";
    	if ($_FILES['picred']['name']) $pictname3=handle_file('picred','modeles/'); else $pictname3="spacer.gif";
    	$query="UPDATE cms_shop_model SET brand_id=".tosql($_POST['brandid']).",descr=".tosql($_POST['descr']).",trax=".tosql($_POST['trax']).",year=".tosql($_POST['year']);
    	if ($_FILES['picwhite']['name']) $query.=',pic_white='.tosql($pictname);
    	if ($_FILES['picblack']['name']) $query.=',pic_black='.tosql($pictname1);
    	if ($_FILES['picgrey']['name']) $query.=',pic_grey='.tosql($pictname2);
    	if ($_FILES['picred']['name']) $query.=',pic_red='.tosql($pictname3);
    	$query.=',x1='.tosql($_POST['x1']).',y1='.tosql($_POST['y1']).',x2='.tosql($_POST['x2']).',y2='.tosql($_POST['y2']);
    	$query.=" WHERE id=".tosql($_SESSION['artid']);
    	$db->query($query);
    	unset($_SESSION['newitem']);
     
    }
    elseif ($_POST['do_delwhite']){
    	$query="UPDATE cms_shop_model SET pic_white='nomodel.gif' WHERE id=".tosql($_SESSION['artid']);
    	$db->query($query);
    }
    elseif ($_POST['do_delblack']){
    	$query="UPDATE cms_shop_model SET pic_black='nomodel.gif' WHERE id=".tosql($_SESSION['artid']);
    	$db->query($query);
    }
    elseif ($_POST['do_delgrey']){
    	$query="UPDATE cms_shop_model SET pic_grey='nomodel.gif' WHERE id=".tosql($_SESSION['artid']);
    	$db->query($query);
    }
    elseif ($_POST['do_delred']){
    	$query="UPDATE cms_shop_model SET pic_red='nomodel.gif' WHERE id=".tosql($_SESSION['artid']);
    	$db->query($query);
    }
    elseif ($_POST['del_item']){
    	$query= "DELETE FROM cms_shop_model WHERE id=".tosql($_POST['selectedrow']);
    	$db->query($query);
     
    }	
     
    if (($_POST['cd_item']||$_POST['del_item']) && $_POST['selectedrow']) {
    	$_SESSION['artid']=	$_POST['selectedrow'];
    }
    elseif (!$_POST['do_delwhite'] && !$_POST['do_delblack'] && !$_POST['do_delgrey'] && !$_POST['do_delred']&& !$_POST['changed'])
    {
    	unset($_SESSION['artid']);
    }
     
    if ($_POST['add_item'])
    	include('newmodel.php');
    elseif ($_POST['cd_item'])
    	include('newmodel.php');	
    elseif ($_POST['del_item']){
    	$query= "DELETE FROM cms_shop_model WHERE id=".tosql($_POST['selectedrow']);
    	$db->query($query);
    	include('models.frm.php');
    }
    else
    	include('models.frm.php');
    }

  5. #5
    Membre à l'essai
    Profil pro
    Inscrit en
    Mai 2006
    Messages
    95
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mai 2006
    Messages : 95
    Points : 24
    Points
    24
    Par défaut avis aux specialistes
    alors bien sur moi je me casse la tete depuis 1 semaine alors bonne chance pour les specialistes
    Merci

  6. #6
    Membre à l'essai
    Profil pro
    Inscrit en
    Mai 2006
    Messages
    95
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mai 2006
    Messages : 95
    Points : 24
    Points
    24
    Par défaut
    il y a t-il pas un crack pour m'aider?

  7. #7
    Membre actif Avatar de riesseg
    Profil pro
    Inscrit en
    Mars 2006
    Messages
    415
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mars 2006
    Messages : 415
    Points : 251
    Points
    251
    Par défaut
    $db->connect();

    j'imagine que t'as recup ca sur le net?

    $db ne doit pas etre une variable global, mais un objet que tu aura creer prealablement.
    A savoir dans le cas present un objet servant a gerer un BDD et contenant toutes les grandes focntion SQL:

    - connect
    - deconnect
    - fetch_...
    - etc, etc.
    n'oubliez pas la balise

  8. #8
    Membre expert Avatar de Amara
    Profil pro
    Inscrit en
    Juillet 2004
    Messages
    2 688
    Détails du profil
    Informations personnelles :
    Localisation : France, Sarthe (Pays de la Loire)

    Informations forums :
    Inscription : Juillet 2004
    Messages : 2 688
    Points : 3 115
    Points
    3 115
    Par défaut
    où initialises-tu ta variable $db ?
    Tu n'as pas répondu alors que le problème vient de là, comme riesseg je pense que tu as pris un truc sur le Web (ou que tu dois reprendre de quelqu'un d'autre) sans vraiment chercher à comprendre non ? Sinon réponds on pourra peut-être faire quelque chose après.
    Pas de questions techniques par MP, le forum est là pour ça et est plus efficace.

    Orthographe : une connexion (avec un x), un langage (sans u), une requête (un seul t), 'une quote' (avec qu), une syntaxe (sans h)

  9. #9
    Membre à l'essai
    Profil pro
    Inscrit en
    Mai 2006
    Messages
    95
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mai 2006
    Messages : 95
    Points : 24
    Points
    24
    Par défaut resuite
    En fait je suis entrain de reprendre ces pages mais evidement, ce n'est pas evident ce n'est pas ma composition, aussi mon probleme se situerait dans la page du formulaire mais je ne vois pas ou, mais le probleme n'est pas db connect etant donne que d'autre formulaire sont lies a cette page mais si on va plus bas dans la premiere page on trouveras peut etre le hic...

  10. #10
    Membre actif Avatar de riesseg
    Profil pro
    Inscrit en
    Mars 2006
    Messages
    415
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mars 2006
    Messages : 415
    Points : 251
    Points
    251
    Par défaut
    bin ton pb, c'est $db...

    sors nous ta page ou tu definie ton objet qui utilise connect et tout le tralala
    tsais, celui que tu utilise quand tu fais $db = New Objet_BDD
    n'oubliez pas la balise

  11. #11
    Membre à l'essai
    Profil pro
    Inscrit en
    Mai 2006
    Messages
    95
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mai 2006
    Messages : 95
    Points : 24
    Points
    24
    Par défaut
    cela n'a pas de sens car si tu regarde les autres fonctions dans cette page cela fonctionne?
    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
    <?php
    function parts(){
    global $db;
    $db->connect();
    //echo "------".$_POST['changed']."------";
    //echo "=======".$_POST['art_id']."======";
    //if (!$_POST['changed']) echo 'its changed is false now';
    //$query="SELECT id,brandname FROM cms_shop_brand ORDER BY brandname";
    if (!$_POST['rc']){
    $query="SELECT min(cat_id) from cms_shop_cat";// echo $query;
    $db->query($query);
    $db->next_record();
    $rc=$db->f(0);
    }
    else{
    $rc=$_POST['rc'];
    }
     
    //$brandid=get_param('brandid'); 
    //echo "-----".$_POST['brandid']."-----";
    if (!$_POST['brandid']){
    //$query= "SELECT id FROM cms_shop_brand WHERE rc_brand=".tosql($rc)." LIMIT 1";//echo $query;
    //$db->query($query);
    //$db->next_record();
    //$brandid=$db->f(0);
    $brandid=0;
    }
    else{
    $brandid=$_POST['brandid'];
    }
     
     
    $query= "SELECT id,brandname FROM cms_shop_brand WHERE rc_brand=".tosql($rc)." ORDER BY brandname";
     
    if ($brandid>0){
    $brandlistraw=get_options($query,false,true,$brandid);
    $brandlist="<option value='-1'>Toutes les marques</option>";
    $brandlist.=$brandlistraw;
    }
    else{
    $brandlist.="<option value='-1' SELECTED>Toutes les marques</option>";
    $brandlist.=get_options($query,false,true,-1);
    }
    if (!$_POST['changed']){
    //echo "<br>SOOOOOO<br>";
    //echo "changed state-----".$_POST['changed']."------<br>";
    //echo "changed item=======".$_SESSION['artid']."======";
    if (($_POST['do_add'])&&($_SESSION['newitem'])){ 
    	if ($_FILES['picfile']['name']) $pictname=handle_file('picfile'); else $pictname="nopic.gif";
    	if ($_FILES['picfile1']['name']) $pictname1=handle_file('picfile1'); else $pictname1="spacer.gif";
    	if ($_FILES['picfile2']['name']) $pictname2=handle_file('picfile2'); else $pictname2="spacer.gif";
    	if ($_FILES['picfile3']['name']) $pictname3=handle_file('picfile3'); else $pictname3="spacer.gif";
     
    	if (!$_POST['prix']) 
    		$prix='0.00';
    	else
    		$prix=$_POST['prix'];	
    	$query="INSERT INTO cms_shop_items (rc_id,brand_id,item_description,item_trax,item_id,item_price,item_pic,item_pic1,item_pic2,item_pic3,item_comment,item_nosell,item_new,item_special,item_ftech) VALUES (";
    	$query.=tosql($rc).",".tosql($brandid).",".tosql($_POST['descr']).",".tosql($_POST['itemtrax']).",".tosql($_POST['itemid']).",";
    	$query.=tosql($prix).",".tosql($pictname).",".tosql($pictname1).",".tosql($pictname2).",".tosql($pictname3).",".tosql($_POST['comment']).",".get_checkbox_value($_POST['nosell'],'1','0').",".get_checkbox_value($_POST['newitem'],'1','0').",".get_checkbox_value($_POST['itemspecial'],'1','0').",";
    	$query.=tosql($_POST['ftech']).")";
    	$db->query($query);
    	unset($_SESSION['newitem']);
    }//end adding
    //---------------------
    //refleter les modifs
    elseif (($_POST['do_update'])&&($_SESSION['artid'])){
    //echo "<br>GOING TO UPDATE<br>";
    	if ($_FILES['picfile']['name']) $pictname=handle_file('picfile'); else $pictname="nopic.gif";
    	if ($_FILES['picfile1']['name']) $pictname1=handle_file('picfile1'); else $pictname1="spacer.gif";
    	if ($_FILES['picfile2']['name']) $pictname2=handle_file('picfile2'); else $pictname2="spacer.gif";
    	if ($_FILES['picfile3']['name']) $pictname3=handle_file('picfile3'); else $pictname3="spacer.gif";	
    	$query='UPDATE cms_shop_items SET ';
    	$query.='rc_id='.tosql($rc);
    	$query.=',brand_id='.tosql($brandid);
    	//$query.=',target_id='.tosql($_POST['targetid']);
    	$query.=',item_description='.tosql($_POST['descr']);
    	$query.=',item_trax='.tosql($_POST['itemtrax']);	
    	$query.=',item_id='.tosql($_POST['itemid']);
    	$query.=',item_dia='.tosql($_POST['itemdia']);
    	$query.=',item_price='.tosql($_POST['prix']);
    	if ($_FILES['picfile']['name'])	$query.=',item_pic='.tosql($pictname);
    	if ($_FILES['picfile1']['name']) $query.=',item_pic1='.tosql($pictname1);
    	if ($_FILES['picfile2']['name']) $query.=',item_pic2='.tosql($pictname2);
    	if ($_FILES['picfile3']['name']) $query.=',item_pic3='.tosql($pictname3);
    	$query.=',item_comment='.tosql($_POST['comment']);
    	$query.=',item_nosell='.get_checkbox_value($_POST['nosell'],'1','0');
    	$query.=',item_special='.get_checkbox_value($_POST['itemspecial'],'1','0');
    	$query.=',item_new='.get_checkbox_value($_POST['newitem'],'1','0');	
    	$query.=',item_ftech='.tosql($_POST['ftech']);
    	$query.=' WHERE id='.tosql($_SESSION['artid']);
    	$db->query($query); //echo $query;
    	unset($_SESSION['artid']);
    }
    elseif ($_POST['do_delpic']){
    	$query="UPDATE cms_shop_items SET item_pic='nopic.gif' WHERE id=".tosql($_SESSION['artid']);
    	$db->query($query);
    }
    elseif ($_POST['do_delpic1']){
    	$query="UPDATE cms_shop_items SET item_pic1='spacer.gif' WHERE id=".tosql($_SESSION['artid']);
    	$db->query($query);
    }
    elseif ($_POST['do_delpic2']){
    	$query="UPDATE cms_shop_items SET item_pic2='spacer.gif' WHERE id=".tosql($_SESSION['artid']);
    	$db->query($query);
    }
    elseif ($_POST['do_delpic3']){
    	$query="UPDATE cms_shop_items SET item_pic3='spacer.gif' WHERE id=".tosql($_SESSION['artid']);
    	$db->query($query);
    }
     
    //end refleter les modifs
    //---------------------
    if (($_POST['cd_item']||$_POST['del_item']) && $_POST['selectedrow']) {
    	$_SESSION['artid']=$_POST['selectedrow'];
    }
    elseif (!$_POST['do_delpic'] && !$_POST['do_delpic1'] && !$_POST['do_delpic2'] && !$_POST['do_delpic3']&& !$_POST['changed'])
    {
    	unset($_SESSION['artid']);
    }	
    //end changement d'article
    }
    //--------------------
    //get the list of categories
    $query="SELECT b.cat_id,concat(a.category,' > ',b.category) FROM cms_shop_cat a, cms_shop_cat b WHERE (b.lang=1 AND b.parentid=a.cat_id) ORDER BY (a.cat_id+b.parentid*b.parentid)";
    $query1="SELECT cat_id, category FROM cms_shop_cat WHERE parentid=0";
     
    if (isset($rc)){
    	$catlist_raw=get_options($query,false,true,$rc);
    	$catlist_raw.=get_options($query1,false,true,$rc);
    	$catlist.=$catlist_raw;
    }	
    else{
    	$catlist_raw=get_options($query,false,true,0);
    	$catlist_raw.=get_options($query1,false,true,0);
    	$catlist.=$catlist_raw;
    }	
     
    if (($_POST['add_item'])||($_POST['do_delpic'])||($_POST['do_delpic1'])||($_POST['do_delpic2'])||($_POST['do_delpic3'])||($_POST['changed']=='1')){
    if ($_POST['selectedrow']) $_SESSION['artid']=$_POST['selectedrow'];
    	include('newart.php');
    	}
    elseif ($_POST['cd_item'])
    	include('newart.php');	
    elseif ($_POST['del_item']){
    	$query= "DELETE FROM cms_shop_items WHERE id=".tosql($_POST['selectedrow']);
    	$db->query($query);
    	include('articles.frm.php');
    }
    else
    	include('articles.frm.php');
    }
     
    function brands(){
    global $db;
    $db->connect();
    if ($_POST['do_add']){ 
    	$query="INSERT INTO cms_shop_brand (brandname,rc_brand) values(".tosql($_POST['brandname']).",".tosql($_POST['categorieid']).")";
    	$db->query($query);
    }
    elseif ($_POST['do_update']){
    	$query="UPDATE cms_shop_brand SET brandname=".tosql($_POST['brandname']).",rc_brand=".tosql($_POST['categorieid'])." WHERE id=".tosql($_SESSION['artid']);
    	$db->query($query);
    }
     
     
    if (($_POST['cd_item']||$_POST['del_item']) && $_POST['selectedrow']) {
    	$_SESSION['artid']=	$_POST['selectedrow'];
    }
    elseif (!$_POST['do_delpic'])
    	unset($_SESSION['artid']);
     
    if ($_POST['add_item'])
    	include('newbrand.php');
    elseif ($_POST['cd_item'])
    	include('newbrand.php');	
    elseif ($_POST['del_item']){
    	$query= "DELETE FROM cms_shop_brand WHERE id=".tosql($_POST['selectedrow']);
    	$db->query($query);
    	include('brands.frm.php');
    }
    else
    	include('brands.frm.php');
    }
     
     
    function models(){
    global $db;
    $db->connect();
    $query="SELECT id,brandname FROM cms_shop_brand ORDER BY brandname";
    $brandlist=get_options($query,false,true,$_POST['brandid']);
    if (($_POST['do_add1'])&&($_SESSION['artid'])){ 
    	if ($_FILES['picwhite']['name']) $pictname=handle_file('picwhite','modeles/'); else $pictname="spacer.gif";
    	if ($_FILES['picblack']['name']) $pictname1=handle_file('picblack','modeles/'); else $pictname1="spacer.gif";
    	if ($_FILES['picgrey']['name']) $pictname2=handle_file('picgrey','modeles/'); else $pictname2="spacer.gif";
    	if ($_FILES['picred']['name']) $pictname3=handle_file('picred','modeles/'); else $pictname3="spacer.gif";
     
    	$query="INSERT INTO cms_shop_model(brand_id,descr,trax,year) values(".tosql($_POST['brandid']).",".tosql($_POST['descr']).",".tosql($_POST['trax']).",".tosql($_POST['year']).")";
    	$db->query($query);
    	unset($_SESSION['artid']);
    }
    elseif (($_POST['do_update'])&&($_SESSION['artid'])){
     
    	if ($_FILES['picwhite']['name']) $pictname=handle_file('picwhite','modeles/'); else $pictname="spacer.gif";
    	if ($_FILES['picblack']['name']) $pictname1=handle_file('picblack','modeles/'); else $pictname1="spacer.gif";
    	if ($_FILES['picgrey']['name']) $pictname2=handle_file('picgrey','modeles/'); else $pictname2="spacer.gif";
    	if ($_FILES['picred']['name']) $pictname3=handle_file('picred','modeles/'); else $pictname3="spacer.gif";
    	$query="UPDATE cms_shop_model SET brand_id=".tosql($_POST['brandid']).",descr=".tosql($_POST['descr']).",trax=".tosql($_POST['trax']).",year=".tosql($_POST['year']);
    	if ($_FILES['picwhite']['name']) $query.=',pic_white='.tosql($pictname);
    	if ($_FILES['picblack']['name']) $query.=',pic_black='.tosql($pictname1);
    	if ($_FILES['picgrey']['name']) $query.=',pic_grey='.tosql($pictname2);
    	if ($_FILES['picred']['name']) $query.=',pic_red='.tosql($pictname3);
    	$query.=',x1='.tosql($_POST['x1']).',y1='.tosql($_POST['y1']).',x2='.tosql($_POST['x2']).',y2='.tosql($_POST['y2']);
    	$query.=" WHERE id=".tosql($_SESSION['artid']);
    	$db->query($query);
    	unset($_SESSION['newitem']);
     
    }
    elseif ($_POST['do_delwhite']){
    	$query="UPDATE cms_shop_model SET pic_white='nomodel.gif' WHERE id=".tosql($_SESSION['artid']);
    	$db->query($query);
    }
    elseif ($_POST['do_delblack']){
    	$query="UPDATE cms_shop_model SET pic_black='nomodel.gif' WHERE id=".tosql($_SESSION['artid']);
    	$db->query($query);
    }
    elseif ($_POST['do_delgrey']){
    	$query="UPDATE cms_shop_model SET pic_grey='nomodel.gif' WHERE id=".tosql($_SESSION['artid']);
    	$db->query($query);
    }
    elseif ($_POST['do_delred']){
    	$query="UPDATE cms_shop_model SET pic_red='nomodel.gif' WHERE id=".tosql($_SESSION['artid']);
    	$db->query($query);
    }
    elseif ($_POST['del_item']){
    	$query= "DELETE FROM cms_shop_model WHERE id=".tosql($_POST['selectedrow']);
    	$db->query($query);
     
    }	
     
    if (($_POST['cd_item']||$_POST['del_item']) && $_POST['selectedrow']) {
    	$_SESSION['artid']=	$_POST['selectedrow'];
    }
    elseif (!$_POST['do_delwhite'] && !$_POST['do_delblack'] && !$_POST['do_delgrey'] && !$_POST['do_delred']&& !$_POST['changed'])
    {
    	unset($_SESSION['artid']);
    }
     
    if ($_POST['add_item'])
    	include('newmodel.php');
    elseif ($_POST['cd_item'])
    	include('newmodel.php');	
    elseif ($_POST['del_item']){
    	$query= "DELETE FROM cms_shop_model WHERE id=".tosql($_POST['selectedrow']);
    	$db->query($query);
    	include('models.frm.php');
    }
    else
    	include('models.frm.php');
    }
     
    function handle_file($itemname='picfile',$path='articles/'){//returns the document_id, used in inserts and updates
    global $db;
    	$ext=strtolower(substr($_FILES[$itemname]['name'],strlen($_FILES[$itemname]['name'])-3,3));
    	$http=substr($_FILES[$itemname]['name'],0,4);
    	if ( ($ext=='jpg')||($ext=='gif')||($ext=='png') )//&&($http!='http')
    		{
    			$srcf=stripslashes($_FILES[$itemname]['name']); 
    			$_SESSION['pic_name']=$srcf;
    			$_SESSION['pic_size']=$_FILES['pic_file']['size'];
    			$_SESSION['pic_type']=$ext;
     
    			$tmp_path='../../images/'.$path;
    			$destf= $tmp_path.$srcf;
     
    			if (copy($_FILES[$itemname]['tmp_name'],$destf))
    				{
    					if (($ext=='jpg')||($ext=='gif')||($ext=='png'))
    					save_thumb($srcf,$ext,$tmp_path);
    					return $srcf;
    				}
    			else
    				{
    					return false;
    				}	
    		}	
    	else		
    		{//make hyperlink
    			$_SESSION['pic_name']=$_FILES[$itemname]['name'];
    			$_SESSION['pic_size']=0;
    			$_SESSION['pic_type']=$ext;
    			return true;
    		}
    }
     
    ?>

  12. #12
    Membre à l'essai
    Profil pro
    Inscrit en
    Mai 2006
    Messages
    95
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mai 2006
    Messages : 95
    Points : 24
    Points
    24
    Par défaut
    si tu regarde la function brands

    J'ai un code similaire pour une autre page formulaire et cela fonctionne et il y a aussi db connect

  13. #13
    Membre actif Avatar de riesseg
    Profil pro
    Inscrit en
    Mars 2006
    Messages
    415
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mars 2006
    Messages : 415
    Points : 251
    Points
    251
    Par défaut
    Citation Envoyé par clovis200
    cela n'a pas de sens car si tu regarde les autres fonctions dans cette page cela fonctionne?
    Je sais pas...
    C'est pas a moi qu'il faut poser la question, mais a toi de nous dire:

    - non ce n'est pas un probleme avec $db.
    je l'utilise autre part et sa marche trés bien.
    Je pense que mon erreur se situe par la ( et tu nous montre la ligne) car mes echo se rendent jusqu'ici.
    POurriez vous m'aider et voir si vous trouvez quelque chose d'anormale?
    Merci

    Dans ce cas, on pourra surrement avance

    Meme si je suis vraiment troubler par $db...
    n'oubliez pas la balise

  14. #14
    Membre expert Avatar de Amara
    Profil pro
    Inscrit en
    Juillet 2004
    Messages
    2 688
    Détails du profil
    Informations personnelles :
    Localisation : France, Sarthe (Pays de la Loire)

    Informations forums :
    Inscription : Juillet 2004
    Messages : 2 688
    Points : 3 115
    Points
    3 115
    Par défaut
    Plus tu balanceras de code et moins les gens t'aideront, faut pas croire qu'on va tout lire et tout comprendre en détail
    Donc pour débugger mets des echo un peu partout pour tes variables et surtout tes requêtes, ça te permettra de localiser précisement le problème et de trouver ainsi la solution.
    Pas de questions techniques par MP, le forum est là pour ça et est plus efficace.

    Orthographe : une connexion (avec un x), un langage (sans u), une requête (un seul t), 'une quote' (avec qu), une syntaxe (sans h)

  15. #15
    Membre à l'essai
    Profil pro
    Inscrit en
    Mai 2006
    Messages
    95
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mai 2006
    Messages : 95
    Points : 24
    Points
    24
    Par défaut
    des echo mais je les place ou?

  16. #16
    Membre à l'essai
    Profil pro
    Inscrit en
    Mai 2006
    Messages
    95
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mai 2006
    Messages : 95
    Points : 24
    Points
    24
    Par défaut
    dans mon formulaire il y en a deja des echos.......

  17. #17
    Membre expert Avatar de Amara
    Profil pro
    Inscrit en
    Juillet 2004
    Messages
    2 688
    Détails du profil
    Informations personnelles :
    Localisation : France, Sarthe (Pays de la Loire)

    Informations forums :
    Inscription : Juillet 2004
    Messages : 2 688
    Points : 3 115
    Points
    3 115
    Par défaut
    Citation Envoyé par clovis200
    des echo mais je les place ou?
    Partout où tu as un doute.

    Pour une variable $var dont tu n'es pas sûr que sa valeur soit celle qu tu attends tu fais
    Pour les requêtes, tu les mets dans une variables $req et après tu les affiches comme ça tu sais si c'est ce que tu attends.

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    $req = "SELECT * FROM table";
    echo $req;
    Pas de questions techniques par MP, le forum est là pour ça et est plus efficace.

    Orthographe : une connexion (avec un x), un langage (sans u), une requête (un seul t), 'une quote' (avec qu), une syntaxe (sans h)

  18. #18
    Membre actif Avatar de riesseg
    Profil pro
    Inscrit en
    Mars 2006
    Messages
    415
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mars 2006
    Messages : 415
    Points : 251
    Points
    251
    Par défaut
    je plussoie bien sur notre ami JWhite ^^

    Et je dirai meme de faire des:
    echo "ma_var:" . $ma_var . "| <br />";

    pour etre vraiment sur de comment elle vient (espace ou pas). et le <br> c'est pour pas avoir tous les echos sur une ligne et attachés ^^

    dans le meme trip, t'as les print_r() qui sont geniaux
    n'oubliez pas la balise

  19. #19
    Membre à l'essai
    Profil pro
    Inscrit en
    Mai 2006
    Messages
    95
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mai 2006
    Messages : 95
    Points : 24
    Points
    24
    Par défaut
    ben les echos dans la page du formulaire ca donne rien

  20. #20
    Membre actif Avatar de riesseg
    Profil pro
    Inscrit en
    Mars 2006
    Messages
    415
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Mars 2006
    Messages : 415
    Points : 251
    Points
    251
    Par défaut
    bin dire que ca donne rien ca sert po a grand chose...

    c'est dans des cas comme ca qu'on revient avec du cose en donnant les lignes ou ca ne s'affiche plus...
    Et juste une dizaine de ligne, pas les pavés de la page d'avant

    Et au dessus de ce code tu met:
    j'ai bien $1, $2, ma requetes $req est correcte, mais il recupere pas $var ici...
    n'oubliez pas la balise

Discussions similaires

  1. problem dans formulaire
    Par spilliaert dans le forum Langage
    Réponses: 2
    Dernier message: 16/12/2005, 21h23
  2. probleme deux formulaires imbriqués
    Par rony dans le forum Balisage (X)HTML et validation W3C
    Réponses: 2
    Dernier message: 21/06/2005, 18h19
  3. Réponses: 3
    Dernier message: 24/02/2005, 15h48
  4. [CSS]Probleme de formulaire entre IE et Firefox
    Par Steph82 dans le forum Mise en page CSS
    Réponses: 6
    Dernier message: 17/02/2005, 18h34
  5. Probleme de formulaire d'upload
    Par Oberown dans le forum ASP
    Réponses: 5
    Dernier message: 26/10/2004, 14h00

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