begin process at 2012 05 28 11:48:19
  Trouver un code source :
 
dans
 
Accueil > Forum > 

PHP

 > 

Base de données

 > 

MySQL

 > 

j'ai un probléme dans mon code mais je sais pas ou?


Derniers messages déposésPoser une question dans le forum ou lancer une discussion

j'ai un probléme dans mon code mais je sais pas ou?

vendredi 1 février 2008 à 13:03:28 | j'ai un probléme dans mon code mais je sais pas ou?

hakiman

je suis en train de créer un site e-commerce .
le probléme que j'ai cré un programme concernant l'insertion des données dans la table article
ses données sont ajoutées dans la table en fonction de l'existance des photo
mais ce programme ça marche je sais pas ou est le probléme .
Merci de m'aider.
voila mon code :
<? include("connect.php");?>
<?
if(isset($_POST['Reset']))
{
echo "<script language='Javascript'>
<!--
document.location.replace('article.php');
// -->
</script>";
}

if(isset($_POST['Submit']))

{

  $image1=$_FILES['image1']['tmp_name'];
  $image2=$_FILES['image2']['tmp_name'];
   
 

     if($image1!="" and $image1!="none") //1p
    {
     if($image2!="" and $image2!="non")
     {
        $nom1=strftime('%d%m%y%H%M%S').'log_utilisateur'."1.gif";
       copy($image1, "images_article/$nom1");
        $nom2=strftime('%d%m%y%H%M%S').'log_utilisateur'."1.gif";
       copy($image2, "images_article/$nom2");
       
        $update_article = mysql_query("UPDATE article SET nom_art='$nom_art',reference='$ref',des='$des',prix_vente='$prix_vente',prix_promo='$prix_promo',qte_stock='$qte_stock',qte_vendue='$qte_vendue',qte_com='$qte_com',qte_fab='$fab',promo='$promo',famille='$cat',sousfamille='$souscat',cd_trp='$cd_trp',derniere_vente='$date',photo1='$nom1',photo2='$nom2' WHERE id_article='$id_article'",$id);
      }
      else
     
      {$nom1=strftime('%d%m%y%H%M%S').'log_utilisateur'."1.gif";
       copy($image1, "images_article/$nom1");
       $update_article = mysql_query("UPDATE article SET nom_art='$nom_art',reference='$ref',des='$des',prix_vente='$prix_vente',prix_promo='$prix_promo',qte_stock='$qte_stock',qte_vendue='$qte_vendue',qte_com='$qte_com',qte_fab='$fab',promo='$promo',famille='$cat',sousfamille='$souscat',cd_trp='$cd_trp',derniere_vente='$date',photo1='$nom1' WHERE id_article='$id_article'",$id);
      }
   }
  
    else//1v
    {
    if($image!="" and $image!="none")
    {
     
        $update_article = mysql_query("UPDATE article SET nom_art='$nom_art',reference='$ref',des='$des',prix_vente='$prix_vente',prix_promo='$prix_promo',qte_stock='$qte_stock',qte_vendue='$qte_vendue',qte_com='$qte_com',qte_fab='$fab',promo='$promo',famille='$cat',sousfamille='$souscat',cd_trp='$cd_trp',derniere_vente='$date',photo1='$nom1',photo2='$nom2' WHERE id_article='$id_article'",$id);
      }
      else
      {
      $update_article = mysql_query("UPDATE article SET nom_art='$nom_art',reference='$ref',des='$des',prix_vente='$prix_vente',prix_promo='$prix_promo',qte_stock='$qte_stock',qte_vendue='$qte_vendue',qte_com='$qte_com',qte_fab='$fab',promo='$promo',famille='$cat',sousfamille='$souscat',cd_trp='$cd_trp',derniere_vente='$date' WHERE id_article='$id_article'",$id);
      }
      }
     
     echo "<script language='Javascript'>
<!--
document.location.replace('article.php');
// -->
</script>";
 
  }
  elseif(isset($_POST['Submit1']))

  {
    if($image1!="" and $image1!="none") //1p
    {
   
      if($image2!="" and $image2!="none")
      {
        $nom1=strftime('%d%m%y%H%M%S').'log_utilisateur'."1.gif";
        copy($image1, "images_article/$nom1");
          $nom2=strftime('%d%m%y%H%M%S').'log_utilisateur'."1.gif";
        copy($image2, "images_article/$nom2");
        $create_article = mysql_query("INSERT INTO article  values('','$nom_art','$ref','$des','$prix_vente','$prix_promo','$qte_stock','$qte_vendue','$qte_com',$fab','$promo','$cat','$souscat','$cd_trp','$date','$nom1','$nom2')",$id);
     
     }
     elseif( $image2=="" and $image2=="none")
     {
      $nom1=strftime('%d%m%y%H%M%S').'log_utilisateur'."1.gif";
        copy($image1, "images_article/$nom1");
         
        $create_article = mysql_query("INSERT into article values('','$nom','$ref','$des','$prix_vente','$prix_promo','$qte_stock','$qte_vendue','$qte_com','fab','$promo','$cat','$souscat','$cd_trp','$date','$nom1','hh')",$id);
     }
    }
  
    else
    {       
     if($image2!="" and image2!="none")
     {
     $nom2=strftime('%d%m%y%H%M%S').'log_utilisateur'."1.gif";
        copy($image2, "images_article/$nom2");
       $create_article = mysql_query("INSERT INTO article  values('','$nom_art','$ref','$des','$prix_vente','$prix_promo','$qte_stock','$qte_vendue','$qte_com','$fab','$promo','$cat','$souscat','$cd_trp','$date','hh','$nom2')",$id);
      }
      elseif($image2=="" and image2=="none")
 {
 $create_article = mysql_query("INSERT INTO article  values('','$nom_art','$ref','$des','$prix_vente','$prix_promo','$qte_stock','$qte_vendue','$qte_com','$fab','$promo','$cat','$souscat','$cd_trp','$date','hh','hh')",$id);
   
  }}
echo "<script language='Javascript'>
<!--
document.location.replace('article.php');
// -->
</script>";

    }
 

else
{
  $requette_article = mysql_query("select * from article where id_article='$id_article'",$id);
  $result_article =@ mysql_fetch_array($requette_article); 
 
  $nom=$result_article['nom_art'];      
  $des=$result_article['des'];
  $ref=$result_article['reference'];
  $prix_vente=$result_article['prix_vente']; 
  $prix_promo=$result_article['prix_promo'];
  $qte_vendue=$result_article['qte_vendue'];
  $fab=$result_article['qte_fab'];
  $qte_com=$result_article['qte_com'];
  $qte_stock=$result_article['qte_stock'];
  $cd_trp=$result_article['cd_trp'];
  $cat=$result_article['famille'];
  $souscat=$result_article['sousfamille'];
  $promo=$result_article['promo'];
  $date=$result_article['derniere_vente'];
  $photo1=$result_article['photo1'];
  $photo2=$result_article['photo1'];
 
}
   

?>


<html>
<head>
<title>ess-evasion: quad essaouira</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
body {
    margin-left: 0px;
    margin-top: 0px;
    margin-right: 0px;
    margin-bottom: 0px;
    background-color: #ffffff;
}
.style13 {
    color: #FF6600;
    font-size: 10px;
}
.style14 {
    color: #FF6600;
    font-weight: bold;
}
-->
</style>
</head>

<body onLoad="MM_preloadImages('../../../../Nouveau%20dossier/Sauvegarde_de_essaouiracom3.jpg')">
<table width="828" border="0" cellpadding="0" align="center" cellspacing="0" bgcolor="#ffffff">
  <!--DWLayoutTable-->
 <tr><td width="40" height="57"></td>

   <td width="34"></td>
 <tr>
   <td height="203"></td>
   <td valign="top"><!--DWLayoutEmptyCell-->&nbsp;</td>
   <td></td>
 <tr>
 
   <td height="216"></td>
<td valign="top">     <table width="770" height="466" border="0" cellpadding="0" cellspacing="0" bgcolor="#ffffff">
          <!--DWLayoutTable-->
         <form action="article.php" method="post">
               
                <tr>
                  <td height="22" colspan="2" valign="top"><span class="style14"> <font size="1" face="Verdana, Arial, Helvetica, sans-serif">Article :</font></span></td>
                  <td colspan="2" valign="top"><input name="nom" type="text" id="nom" value="<?echo"$nom";?>"></td>
                  <td width="31">&nbsp;</td>
                  <td width="6">&nbsp;</td>
                  <td width="90">&nbsp;</td>
                  <td colspan="2" valign="top"><span class="style14"><font size="1" face="Verdana, Arial, Helvetica, sans-serif">R&eacute;f&eacute;rence:</font></span></td>
                  <td colspan="3" valign="top"><input name="ref" type="text" id="ref" value="<?echo"$ref";?>"></td>
                <td width="24">&nbsp;</td>
                  <td width="87">&nbsp;</td>
                </tr>
                <tr>
                  <td height="22" colspan="2" valign="top">Famille</td>
                  <td colspan="2" valign="top"><input type="text" name="cat" value="<? echo"$cat";?>"></td>
                  <td></td>
                  <td></td>
                  <td></td>
                  <td colspan="2" valign="top">Sous_famille</td>
                  <td colspan="3" valign="top"><input type="text" name="souscat" value="<? echo"$souscat";?>"></td>
                  <td></td>
                  <td></td>
                </tr>
                <tr>
                  <td height="22" colspan="2" valign="top">Prix_vente</td>
                  <td colspan="2" valign="top"><input type="text" name="prix_vente" value="<? echo"$prix_vente";?>"></td>
                  <td></td>
                  <td></td>
                  <td></td>
                  <td colspan="2" valign="top">Prix_promo</td>
                  <td colspan="3" valign="top"><input type="text" name="prix_promo" value="<? echo"$prix_promo";?>"></td>
                  <td></td>
                  <td></td>
                </tr>
                <tr>
                  <td height="22" colspan="2" valign="top">Qte_vendue</td>
                  <td colspan="2" valign="top"><input type="text" name="qte_vendue" value="<? echo"$qte_vendue";?>">                  </td>
                  <td></td>
                  <td></td>
                  <td></td>
                  <td colspan="2" valign="top">Qte_commande</td>
                  <td colspan="3" valign="top"><input type="text" name="qte_com" value="<? echo"$qte_com";?>"></td>
                  <td></td>
                  <td></td>
                </tr>
                <tr>
                  <td height="22" colspan="2" valign="top">Qte_en_fabrication</td>
                  <td colspan="2" valign="top"><input type="text" name="qte_fab" value="<? echo"$fab";?>"></td>
                  <td></td>
                  <td></td>
                  <td></td>
                  <td colspan="2" valign="top">Qte_stock</td>
                  <td colspan="3" valign="top"><input type="text" name="qte_stock" value="<? echo"$qte_stock";?>"></td>
                  <td></td>
                  <td></td>
                </tr>
                <tr>
                  <td height="22" colspan="2" valign="top">Promo</td>
                  <td colspan="2" valign="top"><input type="text" name="promo" value="<? echo"$promo";?>"></td>
                  <td></td>
                  <td></td>
                  <td></td>
                  <td colspan="2" valign="top">Code_transport</td>
                  <td colspan="3" valign="top"><input type="text" name="cd_trp" value="<? echo"$cd_trp";?>"></td>
                  <td></td>
                  <td></td>
                </tr>
                <tr>
                  <td width="55" height="18"></td>
                  <td width="61"></td>
                  <td colspan="2" rowspan="3" valign="top"><textarea name="des"> <? echo"$des";?></textarea></td>
                  <td></td>
                  <td></td>
                  <td></td>
                  <td width="9"></td>
                  <td width="93"></td>
                  <td width="36"></td>
                  <td width="5"></td>
                  <td width="104"></td>
                  <td></td>
                  <td></td>
                </tr>
                <tr>
                  <td height="22" colspan="2" valign="top">D&eacute;signation</td>
                  <td></td>
                  <td></td>
                  <td></td>
                  <td colspan="2" valign="top">Derniere_vente</td>
                  <td colspan="3" valign="top"><input type="text" name="date" value="<? echo"$date";?>"></td>
                  <td></td>
                  <td></td>
                </tr>
                <tr>
                  <td height="30">&nbsp;</td>
                  <td>&nbsp;</td>
                  <td></td>
                  <td></td>
                  <td></td>
                  <td>&nbsp;</td>
                  <td>&nbsp;</td>
                  <td>&nbsp;</td>
                  <td>&nbsp;</td>
                  <td>&nbsp;</td>
                  <td></td>
                  <td></td>
                </tr>
                <tr>
                  <td height="18"></td>
                  <td></td>
                  <td width="126"></td>
                  <td width="43"></td>
                  <td></td>
                  <td></td>
                  <td></td>
                  <td></td>
                  <td></td>
                  <td></td>
                  <td></td>
                  <td></td>
                  <td></td>
                  <td></td>
                </tr>
                <tr>
                  <td height="24">               
                  <td>                 
                  <td>                 
                  <td colspan="3" valign="top">photo1               
                  <td colspan="5" valign="top"><input name="image2" type="file" id="image2">               
                  <td>               
                  <td>                 
                  <td>                               
                 
                <tr>
                  <td height="24">               
                  <td>                 
                  <td>                 
                  <td colspan="3" valign="top" class="style13">                                                                                      <strong><font face="Verdana, Arial, Helvetica, sans-serif"><strong>Photo </strong>:</font><font face="Verdana, Arial, Helvetica, sans-serif"></font></strong>
                  <td colspan="4" valign="top">                                                                                                                                                                              <input name="image1" type="file" id="image1">
                  <td>                 
                  <td>               
                  <td>                 
                  <td>                               
                 
                <tr>
                  <td height="300">               
                  <td colspan="4" align="center" valign="top">                                                                                                                                                                                                                                                                                                     <img src="<?echo"images_article/$photo1";?>" width="261" height="300" border="0">                   
                  <td>                 
                  <td>               
                  <td>                 
                  <td colspan="5" valign="top"><img src="<?echo"images_article/$photo2";?>" width="261" height="300" border="0">                                               
                  <td>                 
                 
                <tr>
                  <td height="24" colspan="14" align="center" valign="top">                                                                                                                                                                               
          <input type="submit" name="Submit" value="Modifer">
          <input type="submit" name="Submit1" value="Ajouter">
          <input type="submit" name="Reset" value="Annuler">
          <input type="hidden" name="id_article" value="<? echo"$id_article";?>">
          <input type="hidden" name="act" value="<?echo"$act";?>">
      <tr>
                  <td height="4">               
                  <td>                 
                  <td>                 
                  <td>                 
                  <td>                 
                  <td>                 
                  <td>                 
                  <td>                 
                  <td>               
                  <td>                 
                  <td>                 
                  <td>                 
                  <td>                 
                  <td> </form>                      
                 
   </table>
</body>
</html>

vendredi 1 février 2008 à 15:07:05 | Re : j'ai un probléme dans mon code mais je sais pas ou?

Teclis01

commences par factoriser ton code et proposer que les pqrties aui vont pas.
J'ai pas envie de le lire car ça donne tout sauf envie de lire

--------------------------------------------------------------------------------------------------
         Il vaut mieux poser une question et passer pour bête que le rester toute sa vie

vendredi 1 février 2008 à 15:25:38 | Re : j'ai un probléme dans mon code mais je sais pas ou?

sidf

salut

oui, trop de code tue le code...
vendredi 1 février 2008 à 15:36:08 | Re : j'ai un probléme dans mon code mais je sais pas ou?

hakiman

ok voila mon code PHP
<? include("connect.php");?>
<?
if(isset($_POST['Reset']))
{

}

if(isset($_POST['Submit']))

{

  $image1=$_FILES['image1']['tmp_name'];
  $image2=$_FILES['image2']['tmp_name'];
   
 

     if($image1!="" and $image1!="none") //1p
    {
     if($image2!="" and $image2!="none")
  {
        $nom1=strftime('%d%m%y%H%M%S').'log_utilisateur'."1.gif";
       copy($image1, "images_article/$nom1");
     $nom2=strftime('%d%m%y%H%M%S').'log_utilisateur'."1.gif";
       copy($image2, "images_article/$nom2");
  
        $update_article = mysql_query("UPDATE article SET nom_art='$nom_art',reference='$ref',des='$des',prix_vente='$prix_vente',prix_promo='$prix_promo',qte_stock='$qte_stock',qte_vendue='$qte_vendue',qte_com='$qte_com',qte_fab='$fab',promo='$promo',famille='$cat',sousfamille='$souscat',cd_trp='$cd_trp',derniere_vente='$date',photo1='$nom1',photo2='$nom2' WHERE id_article='$id_article'",$id);
      }
   else
  
   {
   $nom1=strftime('%d%m%y%H%M%S').'log_utilisateur'."1.gif";
       copy($image1, "images_article/$nom1");
    $update_article = mysql_query("UPDATE article SET nom_art='$nom_art',reference='$ref',des='$des',prix_vente='$prix_vente',prix_promo='$prix_promo',qte_stock='$qte_stock',qte_vendue='$qte_vendue',qte_com='$qte_com',qte_fab='$fab',promo='$promo',famille='$cat',sousfamille='$souscat',cd_trp='$cd_trp',derniere_vente='$date',photo1='$nom1' WHERE id_article='$id_article'",$id);
   }
   }
  
 else//1v
 {
 if($image!="" and $image!="none")
 {
 
        $update_article = mysql_query("UPDATE article SET nom_art='$nom_art',reference='$ref',des='$des',prix_vente='$prix_vente',prix_promo='$prix_promo',qte_stock='$qte_stock',qte_vendue='$qte_vendue',qte_com='$qte_com',qte_fab='$fab',promo='$promo',famille='$cat',sousfamille='$souscat',cd_trp='$cd_trp',derniere_vente='$date',photo1='$nom1',photo2='$nom2' WHERE id_article='$id_article'",$id);
      }
   else
   {
   $update_article = mysql_query("UPDATE article SET nom_art='$nom_art',reference='$ref',des='$des',prix_vente='$prix_vente',prix_promo='$prix_promo',qte_stock='$qte_stock',qte_vendue='$qte_vendue',qte_com='$qte_com',qte_fab='$fab',promo='$promo',famille='$cat',sousfamille='$souscat',cd_trp='$cd_trp',derniere_vente='$date' WHERE id_article='$id_article'",$id);
   }
   }
     

 
  }
  elseif(isset($_POST['Submit1']))

  {$image1=$_FILES['image1']['tmp_name'];
  $image2=$_FILES['image2']['tmp_name'];
    if($image1!="" and $image1!="none") //1p
    {
 if($image2!="" and $image2!="none")
   {
        $nom1=strftime('%d%m%y%H%M%S').'gg'."1.gif";
  copy($image1, "images_article/$nom1");
    $nom2=strftime('%d%m%y%H%M%S').'gg'."1.gif";
  copy($image2, "images_article/$nom2");
        $create_article = mysql_query("INSERT INTO article  values('','$nom_art','$ref','$des','$prix_vente','$prix_promo','$qte_stock','$qte_vendue','$qte_com',$fab','$promo','$cat','$souscat','$cd_trp','$date','$nom1','$nom2')",$id);
     
     }
  elseif( $image2=="" and $image2=="none")
  {
   $nom1=strftime('%d%m%y%H%M%S').'log_utilisateur'."1.gif";
  copy($image1, "images_article/$nom1");
   
        $create_article = mysql_query("INSERT into article VALUES('','$nom','$ref','$des','$prix_vente','$prix_promo','$qte_stock','$qte_vendue','$qte_com','$fab','$promo','$cat','$souscat','$cd_trp','$date','$nom1','hh')",$id);
  }
    }
  
 else
 {       
  if($image2!="" and image2!="none")
  {
  $nom2=strftime('%d%m%y%H%M%S').'log_utilisateur'."1.gif";
  copy($image2, "images_article/$nom2");
       $create_article = mysql_query("INSERT INTO article  VALUES('','$nom_art','$ref','$des','$prix_vente','$prix_promo','$qte_stock','$qte_vendue','$qte_com','$fab','$promo','$cat','$souscat','$cd_trp','$date','hh','$nom2')",$id);
      }
   elseif($image2=="" and $image2=="none")
 {
 $create_article = mysql_query("INSERT INTO article  values('','$nom_art','$ref','$des','$prix_vente','$prix_promo','$qte_stock','$qte_vendue','$qte_com','$fab','$promo','$cat','$souscat','$cd_trp','$date','hh','hh')",$id);
 
  }
  }


 }
 

else
{
  $requette_article = mysql_query("select * from article ");
  $result_article =@ mysql_fetch_array($requette_article); 
 
  $nom=$result_article['nom_art'];      
  $des=$result_article['des'];
  $ref=$result_article['reference'];
  $prix_vente=$result_article['prix_vente']; 
  $prix_promo=$result_article['prix_promo'];
  $qte_vendue=$result_article['qte_vendue'];
  $fab=$result_article['qte_fab'];
  $qte_com=$result_article['qte_com'];
  $qte_stock=$result_article['qte_stock'];
  $cd_trp=$result_article['cd_trp'];
  $cat=$result_article['famille'];
  $souscat=$result_article['sousfamille'];
  $promo=$result_article['promo'];
  $date=$result_article['derniere_vente'];
  $photo1=$result_article['photo1'];
  $photo2=$result_article['photo1'];
 
}
 

?>

vendredi 1 février 2008 à 15:40:51 | Re : j'ai un probléme dans mon code mais je sais pas ou?

hakiman

Voila la partie que ne fonctionne pas
  
  elseif(isset($_POST['Submit1']))

  {$image1=$_FILES['image1']['tmp_name'];
  $image2=$_FILES['image2']['tmp_name'];
    if($image1!="" and $image1!="none") //1p
    {
 if($image2!="" and $image2!="none")
   {
        $nom1=strftime('%d%m%y%H%M%S').'gg'."1.gif";
  copy($image1, "images_article/$nom1");
    $nom2=strftime('%d%m%y%H%M%S').'gg'."1.gif";
  copy($image2, "images_article/$nom2");
        $create_article = mysql_query("INSERT INTO article  values('','$nom_art','$ref','$des','$prix_vente','$prix_promo','$qte_stock','$qte_vendue','$qte_com',$fab','$promo','$cat','$souscat','$cd_trp','$date','$nom1','$nom2')",$id);
     
     }
  elseif( $image2=="" and $image2=="none")
  {
   $nom1=strftime('%d%m%y%H%M%S').'log_utilisateur'."1.gif";
  copy($image1, "images_article/$nom1");
   
        $create_article = mysql_query("INSERT into article VALUES('','$nom','$ref','$des','$prix_vente','$prix_promo','$qte_stock','$qte_vendue','$qte_com','$fab','$promo','$cat','$souscat','$cd_trp','$date','$nom1','hh')",$id);
  }
    }
  
 else
 {       
  if($image2!="" and image2!="none")
  {
  $nom2=strftime('%d%m%y%H%M%S').'log_utilisateur'."1.gif";
  copy($image2, "images_article/$nom2");
       $create_article = mysql_query("INSERT INTO article  VALUES('','$nom_art','$ref','$des','$prix_vente','$prix_promo','$qte_stock','$qte_vendue','$qte_com','$fab','$promo','$cat','$souscat','$cd_trp','$date','hh','$nom2')",$id);
      }
   elseif($image2=="" and $image2=="none")
 {
 $create_article = mysql_query("INSERT INTO article  values('','$nom_art','$ref','$des','$prix_vente','$prix_promo','$qte_stock','$qte_vendue','$qte_com','$fab','$promo','$cat','$souscat','$cd_trp','$date','hh','hh')",$id);
 
  }
  }


 }
 

vendredi 1 février 2008 à 17:43:34 | Re : j'ai un probléme dans mon code mais je sais pas ou?

Teclis01

Indentation, typage, ou est ce que le code passe ?, print_r($_POST);
Nous analysons nous ne sommes pas devin (ou pas encore )

--------------------------------------------------------------------------------------------------
         Il vaut mieux poser une question et passer pour bête que le rester toute sa vie

vendredi 1 février 2008 à 18:00:59 | Re : j'ai un probléme dans mon code mais je sais pas ou?

hakiman

je suis en train de créer un site e-commerce .
le probléme que j'ai cré un programme concernant l'insertion des données dans la table article
ces données sont ajoutées dans la table en fonction de l'existance des photo
mais ce programme ça marche je sais pas ou est le probléme .
les données ne sont pas ajoutées
comment je vais faire pour résoudre sous probléme?

mercredi 6 février 2008 à 10:52:21 | Re : j'ai un probléme dans mon code mais je sais pas ou?

lesdis

Bonjour,

Qui y a t'il dans $_POST['Submit1']?

Je suis désolé mais une variable ne peut pas avoir deux valeurs en même temps donc : $image2="" and $image2="none". Est tu sur de ne pas vouloir mettre un "or" à la place du "and"?

Essaie de savoir par où ca passe en rajoutant des "echo" ou "print_r" avant tes conditions pour savoir ce que contient tes variables. Rajoutes des "or die" sur tes insertions SQL afin de récupérer les erreurs. Y a t'il un message d'erreur PHP lorsque tu appel la page? etc.

En fait, nous ne pourrons pas bcp t'aider car nous ne possédons pas les autres pages du site, les structures de table... Il faut tu trouves ou celà coince et nous pourrons ensuite t'aider :)

Bonne Prog
jeudi 7 février 2008 à 15:32:19 | Re : j'ai un probléme dans mon code mais je sais pas ou?

sidf

Réponse acceptée !

salut


 if($image2!="" and  image2!="none")


moi j'ai un doute sur le and ?.. je mettrais && 

jeudi 7 février 2008 à 16:40:43 | Re : j'ai un probléme dans mon code mais je sais pas ou?

lesdis

Bonjour,

Oui tout à fait... a cause de vb ca


Bonne Prog

1 2

Cette discussion est classée dans : prix, article, vente, promo, qte


Répondre à ce message

Sujets en rapport avec ce message

Problème modif quantité caddy php [ par kida28 ] KidaBoujour à tous,Après avoir enfin résolu mon problème de Add_caddy, voilà que j'ai un souci avec la modification de mes quantité.Le problème est qu Problème modif quantité caddy php [ par kida28 ] KidaBoujour à tous,Voilà, je cherche déjà depuis 2 ou 3 jours comment faire pour modif ier la quantité d'un produit dans mon caddy, mais je ne sais pa Error: Unsupported operand types - Caddy php [ par kida28 ] KidaBoujour à tous,Lorsque je modifie la quantité dans mon caddie j'ai cette erreur: "Fatal error: Unsupported operand types i recalcul caddy selon qte, étrange ??? [ par kida28 ] KidaBoujour,Après avoir beaucoup galèré pour modifier la qte dans mon caddy, enfin il me recalcule bien mon caddie ,mais pas ligne par ligne il m'ajou balise div et select [ par yop59 ] bonjour j'ai un gros souci,, cea fait 2jours que j'essai dans une table de type div contenant un article, un qte de modifier la qte avec un select et pb requete mysql [ par Tomcube ] Salut à tous,J'ai un problème pour créer une requête mysql.J'ai une table "vente" avec des champs "id_vente, id_vendeur, id_objet, prix, qtt". Là deda afficher 4 prix différents pour un article dans un icommerce [ par MLucie ] Bojour, sur un site ecommerce je voudrais mettre 4 prix différents pour chaque article, je me prend la ^tete car je ni arrive pas, quelqu'un peut m'ai suppression d'un objet d'une classe [ par ju0123456789 ] Bonjour, j'ai un souci d'execution de programme. Le premier se situe à la ligne : [code=php]public var $element_panier = array();[/code] le deuxieme créer un site de vente [ par dauphins14 ] bonjour, j'aimerais créer un site de vente. Avec une base de données et un panier virtuel avec la possibilité de mettre payal. Donc j'ai crée que la b Requete sql , calcul et input text [ par mary62 ] Bonjour à tous , Voilà j'ai créer un formulaire d'inscription où selon la selection du client avec des radios boutons j'affiche un prix (obtenu par u


Nos sponsors


Sondage...

CalendriCode

Mai 2012
LMMJVSD
 123456
78910111213
14151617181920
21222324252627
28293031   

Consulter la suite du CalendriCode

A découvrir



 
Développement réalisé par Nicolas SOREL (Nix) avec l'aide de : Cyril DURAND et Emmanuel (EBArtSoft), Merci à Vincent pour ses précieux conseils.
CodeS-SourceS.com© Toute reproduction même partielle est interdite sauf accord écrit du Webmaster
CodeS-SourceS.com© est une marque déposée tous droits réservés

Google Coop CodeS-SourceS Google Coop CodeS-SourceS
Temps d'éxécution de la page : 1,966 sec (3)

Nous contacter | Annoncer sur CodeS-SourceS | Mentions légales