bonjour, un formulaire doit remplir une bdd mais j'ai le message suivant
Erreur SQL !INSERT INTO bien(index,pays,region,dep,ville,type,adulte,enfant,sdb,clim,ext,piscine,repas,kreeter,pays2,region2,photo1,photo2,photo3,photo4,photo5) VALUES('','france','aquitaine','33','bordeaux','chambre','1','0','non','non','non','non','oui','non','france','midi','1','2','3','4','5)
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 'index,pays,region,dep,ville,type,adulte,enfant,sdb,clim,ext,piscine,repas,kreete' at line 1
voici mon script
// on écrit la requête sql
$sql = "INSERT INTO bien(index,pays,region,dep,ville,type,adulte,enfant,sdb,clim,ext,piscine,repas,kreeter,pays2,region2,photo1,photo2,photo3,photo4,photo5)
je ne vois pas d'erreur et je ne trouve rien dans le forum
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4 VALUES('','$pays','$region','$dep','$ville','$type','$adulte','$enfant','$sdb','$clim','$ext','$piscine','$repas','$kreeter','$pays2','$region2','$photo1','$photo2','$photo3','$photo4','$photo5)"; // on insère les informations du formulaire dans la table mysql_query($sql) or die('Erreur SQL !'.$sql.'<br>'.mysql_error());
merci de votre aide
Partager