I have the following code, I used another similar one to do an update of the database, but this one now does not work; it gives the following error:
Warning: PDOStatement :: execute (): SQLSTATE [HY093]: Invalid parameter number: parameter was not defined in C: \ wamp \ www \ F1 \ php_programmes \ modateurpilote.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']
)
);
? >