Erreur en php

c'est mon erreur INSERT INTO quantitec values(null,'',,'')You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''')' at line 1 INSERT INTO quantitec values(null,'',,'')
et ceci est mon code php
case "ajouter_quantite":
extract($_POST);
echo $req="INSERT INTO quantitec values(null,'$nombre',$prix,'$finition')";
mysql_query($req) or die(mysql_error()."\n".$req);
mysql_close();
header("location:cartevis.php");

1 réponse

  1. Salut,

    L'erreur est plutôt explicite, les variables $nombre',$prix,'$finition' ne doivent pas être définies, il faut que tu vérifie les champs du formulaire qui envoie ces variable en POST
    1. merci