PHP / Notice: Undefined variable: WHERE in

Résolu/Fermé
nik029 Messages postés 281 Date d'inscription mardi 1 juillet 2008 Statut Membre Dernière intervention 13 avril 2022 - 2 juil. 2012 à 15:08
nik029 Messages postés 281 Date d'inscription mardi 1 juillet 2008 Statut Membre Dernière intervention 13 avril 2022 - 2 juil. 2012 à 15:15
Bonjour,

Je ne comprends pas pourquoi le message d'erreur suivant s'affiche :

Notice: Undefined variable: WHERE in (...) on line 56
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 'id='13'' at line 1


Ma ligne 56 étant :

$sql = "UPDATE locataires SET nom='$nom', prenom='$prenom', email='$email', adresse='$adresse', ville='$ville', codep='$codep', telephone='$telephone', portable='$portable', periode='$periode', tarif='$tarif', adultes='$adultes', enfants='$enfants', animaux='$animaux', options='$options', infossup='$infossup', contrat='$contrat', mentionslegales='$mentionslegales' $WHERE id='{$_GET['id']}'";
	  $requete = mysql_query($sql) or die(mysql_error()); 


Quelqu'un pourrait m'aider ?

Merci d'avance.

A voir également:

2 réponses

Dge-06 Messages postés 14 Date d'inscription lundi 27 février 2012 Statut Membre Dernière intervention 2 juillet 2012 4
2 juil. 2012 à 15:12
remplace $WHERE par WHERE :)
2
nik029 Messages postés 281 Date d'inscription mardi 1 juillet 2008 Statut Membre Dernière intervention 13 avril 2022 44
2 juil. 2012 à 15:15
Merci beaucoup ! :)
0