Parse error: syntax error, unexpected ';', expecting '{'
Résolu
Zakarya93
Messages postés
1026
Statut
Membre
-
Zakarya93 Messages postés 1026 Statut Membre -
Zakarya93 Messages postés 1026 Statut Membre -
Bonjour,
J'ai cette erreur : Parse error: syntax error, unexpected ';', expecting '{' in C:\wamp\www\rs\functions\update.func.php on line 4
update.func.php :
J'ai cette erreur : Parse error: syntax error, unexpected ';', expecting '{' in C:\wamp\www\rs\functions\update.func.php on line 4
update.func.php :
<?php
//la function qui va changer les informations du membre
function changer_informations_membre($email,$apropos);
{
$request = $bdd->prepare('UPDATE utilisateurs SET email = :email, apropos = :apropos');
$request->execute(array(
'email' => $email,
'apropos' => $apropos
));
}
?>
A voir également:
- Syntax error, unexpected '|', expecting variable (t_variable)
- Cmos checksum error ✓ - Forum Carte-mère/mémoire
- Impossible de créer le fichier de travail. vérifiez la variable d'environnement temp ✓ - Forum Word
- Parse error: syntax error, unexpected token "use" ✓ - Forum PHP
- Error 1962 ✓ - Forum PC fixe
- Playback error reconnect in 3s (1/5) francais - Forum Box et Streaming vidéo
-Notice: Undefined variable: bdd in C:\wamp\www\rs\functions\update.func.php on line 6
-Fatal error: Call to a member function prepare() on a non-object in C:\wamp\www\rs\functions\update.func.php on line 6
au début de ta fonction !
<?php //la function qui va changer les informations du membre function changer_informations_membre($email,$apropos) global $bdd; // déclaration globale de BDD { $request = $bdd->prepare('UPDATE utilisateurs SET email = :email, apropos = :apropos'); $request->execute(array( 'email' => $email, 'apropos' => $apropos )); } ?><?php //la function qui va changer les informations du membre function changer_informations_membre($email,$apropos) { global $bdd; // déclaration globale de BDD $request = $bdd->prepare('UPDATE utilisateurs SET email = :email, apropos = :apropos'); $request->execute(array( 'email' => $email, 'apropos' => $apropos )); } ?>RESOLU MERCI :)