1
I have the following code, I used another similar to do a database update, but this now does not work; it gives the following error:
Warning: Pdostatement::execute(): SQLSTATE[HY093]: Invalid number: Parameter was not defined in C: wamp www F1 php_programmes modificateurpilote.php on line 17
<?php
$dbh = new PDO('mysql:host=localhost;dbname=tc4','root','');
$dbh->query('SET NAMES utf8');
$prendre = $dbh->prepare('UPDATE pilotes SET Nom=:mNom, Nationalite= :mNationalite,DateDeNaissance= :mDateDeNaissance, Annees= :mAnnees, Equipe= :mEquipe, NombreDeGP= :mNombreDeGP, Podiums= :mPodiums, Victoires= :mVictoires, TitresPilote= :TitresPilote, Description= :mDescription WHERE Id='.$_POST['id']);
$prendre->execute(array('mNom'=> $_POST['Nom'],
'mNationalite'=> $_POST['Nationalite'],
'mDateDeNaissance'=> $_POST['DateDeNaissance'],
'mAnnees'=> $_POST['Annees'],
'mEquipe'=> $_POST['Equipe'],
'mNombreDeGP'=> $_POST['NombreDeGP'],
'mPodiums'=> $_POST['Podiums'],
'mVictoires'=> $_POST['Victoires'],
'mTitresPilote'=> $_POST['TitresPilote'],
'mDescription'=> $_POST['Description']
)
);
?>
What’s on line 17 of the file
modificateurpilote.php
?– KaduAmaral
Line 17, was the end of the job already...
– Capoub
opaaaa, friend, I found the solution, just below
– Capoub
Oops, I saw it. Cool. :D
– KaduAmaral