le 18/04/2008 à 15:59
zOy
Bonjour à tous, j'ai une erreur SQL et je ne vois pas du tout d'où cela peut provenir.
Voiçi le message d'erreur :
<?
include 'config.php';
// lancement de la requete
$sql = 'INSERT INTO reservation_work1 SET
civilite="'.$_POST['civilite'].'",
nom="'.$_POST['nom'].'",
prenom="'.$_POST['prenom'].'",
naissance="'.$_POST['naissance'].'",
mail="'.$_POST['mail'].'",
adresse="'.$_POST['adresse'].'",
code_postal="'.$_POST['code_postal'].'",
ville="'.$_POST['ville'].'",
pays="'.$_POST['pays'].'",
gsm="'.$_POST['gsm'].'",
tel="'.$_POST['tel'].'",
fax="'.$_POST['fax'].'",
nom_reservation="'.$_POST['nom_reservation'].'",
hotel="'.$_POST['hotel'].'",
nbr_personne="'.$_POST['nbr_personne'].'",
single="'.$_POST['single'].'",
double="'.$_POST['double'].'",
triple="'.$_POST['triple'].'",
debut_sejour="'.$_POST['debut_sejour'].'",
fin_sejour="'.$_POST['fin_sejour'].'",
green_fee="'.$_POST['green_fee'].'",
lesson="'.$_POST['lesson'].'",
buggy_18="'.$_POST['buggy_18'].'",
buggy_9"'.$_POST['buggy_9'].'",
full="'.$_POST['full'].'",
demi_set="'.$_POST['demi_set'].'",
trolley_18="'.$_POST['trolley_18'].'",
driving_range_15="'.$_POST['driving_range_15'].'",
practice_fee="'.$_POST['practice_fee'].'",
caddy="'.$_POST['caddy'].'",
cure_classique2j="'.$_POST['cure_classique2j'].'",
cure_classique4j="'.$_POST['cure_classique4j'].'",
cure_specifique5j="'.$_POST['cure_specifique5j'].'",
soins_hydro="'.$_POST['soins_hydro'].'",
soins_massages="'.$_POST['soins_massages'].'",
soins_relaxation_coreene="'.$_POST['soins_relaxation_coreene'].'",
res_chirurgie="'.$_POST['res_chirurgie'].'"';
// on insere le tuple (mysql_query) et au cas où, on écrira un petit message d'erreur si la requête ne se passe pas bien (or die)
mysql_query ($sql) or die ('Erreur SQL !'.$sql.'<br />'.mysql_error());
// on ferme la connexion à la base
mysql_close();
header('Location: ok_reservation.php');
?>
Voiçi le message d'erreur :
Erreur SQL !INSERT INTO reservation_work1 SET civilite="Madame", nom="BLABLOU", prenom="Fatima", naissance="12/11/1990", mail="contact@accueilsoins-tunisie.com", adresse="fdsf", code_postal="92000", ville="La Rochelle", pays="France", gsm="0614068605", tel="0147246268", fax="0546859634", nom_reservation="DUARTE Mike", hotel="Hotel Hamamet", nbr_personne="5", single="5", double="", triple="", debut_sejour="18-04-2008", fin_sejour="03-05-2008", green_fee="Sans Green Fee", lesson="Pas de le�on", buggy_18="", buggy_9"", full="", demi_set="", trolley_18="", driving_range_15="", practice_fee="Oui", caddy="", cure_classique2j="", cure_classique4j="", cure_specifique5j="", soins_hydro="Forfait FORME (35�)", soins_massages="Massage complet (50m - 28�)", soins_relaxation_coreene="Relaxation cor�ene (60m - 45�)", res_chirurgie="Oui"
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 'double="", triple="", debut_sejour="18-04-2008", fin_sejour="03-05-2008", ' at line 18
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 'double="", triple="", debut_sejour="18-04-2008", fin_sejour="03-05-2008", ' at line 18