Dificulté avec update
Fermé
andyra42
Messages postés
6
Date d'inscription
mardi 29 décembre 2015
Statut
Membre
Dernière intervention
29 décembre 2015
-
Modifié par NHenry le 29/12/2015 à 15:09
jordane45 Messages postés 38145 Date d'inscription mercredi 22 octobre 2003 Statut Modérateur Dernière intervention 25 avril 2024 - 29 déc. 2015 à 18:33
jordane45 Messages postés 38145 Date d'inscription mercredi 22 octobre 2003 Statut Modérateur Dernière intervention 25 avril 2024 - 29 déc. 2015 à 18:33
A voir également:
- Dificulté avec update
- Windows update 0x80070643 - Guide
- Windows update bloqué - Guide
- Asus live update - Télécharger - Utilitaires
- Desactiver windows update - Guide
- Android version 4.2.2 update - Forum Téléphones & tablettes Android
3 réponses
NHenry
Messages postés
15113
Date d'inscription
vendredi 14 mars 2003
Statut
Modérateur
Dernière intervention
22 avril 2024
331
29 déc. 2015 à 15:08
29 déc. 2015 à 15:08
Fais un
echo $req;
Avant ton mysql_query histoire de voir la requête créée.
Petit rappel, l'extension mysql est obsolète
echo $req;
Avant ton mysql_query histoire de voir la requête créée.
Petit rappel, l'extension mysql est obsolète
jordane45
Messages postés
38145
Date d'inscription
mercredi 22 octobre 2003
Statut
Modérateur
Dernière intervention
25 avril 2024
4 650
29 déc. 2015 à 16:02
29 déc. 2015 à 16:02
Bonjour,
Pour éviter les soucis de variables "undefined" il est préférable de récupérer "proprement" ces variables via l'écriture TERNAIRE et un ISSET.
Ce qui donnerait par exemple :
Pour éviter les soucis de variables "undefined" il est préférable de récupérer "proprement" ces variables via l'écriture TERNAIRE et un ISSET.
Ce qui donnerait par exemple :
$code = isset($_POST['code']) ? $_POST['code'] : ''; $nom = isset($_POST['nom']) ? $_POST['nom'] : ''; $email = isset($_POST['email']) ? $_POST['email'] : '';
andyra42
Messages postés
6
Date d'inscription
mardi 29 décembre 2015
Statut
Membre
Dernière intervention
29 décembre 2015
29 déc. 2015 à 16:31
29 déc. 2015 à 16:31
ça me renvoi encore ça
Notice: Undefined index: code in C:\wamp\www\gest_et\modifier.php on line 5
update etudiant set nom='jj',email='g@k.com',photo='Koala.jpg' where code=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
Notice: Undefined index: code in C:\wamp\www\gest_et\modifier.php on line 5
update etudiant set nom='jj',email='g@k.com',photo='Koala.jpg' where code=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
andyra42
Messages postés
6
Date d'inscription
mardi 29 décembre 2015
Statut
Membre
Dernière intervention
29 décembre 2015
29 déc. 2015 à 16:34
29 déc. 2015 à 16:34
Bonjour ça me renvoi encore ça:
Notice: Undefined index: code in C:\wamp\www\gest_et\modifier.php on line 5
update etudiant set nom='jj',email='g@k.com',photo='Koala.jpg' where code=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
Notice: Undefined index: code in C:\wamp\www\gest_et\modifier.php on line 5
update etudiant set nom='jj',email='g@k.com',photo='Koala.jpg' where code=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
Pitet
Messages postés
2826
Date d'inscription
lundi 11 février 2013
Statut
Membre
Dernière intervention
21 juillet 2022
524
29 déc. 2015 à 16:55
29 déc. 2015 à 16:55
Salut,
As tu bien modifié ta ligne 5 pour récupérer la paramètre code avec la solution proposée par jordane45 ?
As tu bien modifié ta ligne 5 pour récupérer la paramètre code avec la solution proposée par jordane45 ?
andyra42
Messages postés
6
Date d'inscription
mardi 29 décembre 2015
Statut
Membre
Dernière intervention
29 décembre 2015
>
Pitet
Messages postés
2826
Date d'inscription
lundi 11 février 2013
Statut
Membre
Dernière intervention
21 juillet 2022
29 déc. 2015 à 17:13
29 déc. 2015 à 17:13
salut
j'ai bien essayé le solution de jordan45; ça donne le même resultat
j'ai bien essayé le solution de jordan45; ça donne le même resultat
Pitet
Messages postés
2826
Date d'inscription
lundi 11 février 2013
Statut
Membre
Dernière intervention
21 juillet 2022
524
29 déc. 2015 à 17:16
29 déc. 2015 à 17:16
Peux tu nous montrer ton code modifié stp ?
29 déc. 2015 à 16:33
Notice: Undefined index: code in C:\wamp\www\gest_et\modifier.php on line 5
update etudiant set nom='jj',email='g@k.com',photo='Koala.jpg' where code=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
29 déc. 2015 à 16:42
Si non, il faut mettre les quotes pour signifier une chaine.
29 déc. 2015 à 16:59
29 déc. 2015 à 17:52
29 déc. 2015 à 18:33
Fais voir ton formulaire HTML