Bonsoir à tous !

J'essaie d'insérer des multi-lignes dans ma table en faisant une boucle mais je ne sais pas trop comment m'y prendre.
Voici mon bout de code :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?php
$Fr_Nom = !empty($Fr_Nom) ? "$Fr_Nom" : NULL;
$Fr_Carte = !empty($Fr_Carte) ? "$Fr_Carte" : NULL;
$Fr_Code = !empty($Fr_Code) ? "$Fr_Code" : NULL;
$Fr_Date = !empty($Fr_Date) ? "$Fr_Date" : NULL;
$Fr_Total = !empty($Fr_Total) ? "$Fr_Total" : NULL;
$Fr_Pourcentage = !empty($Fr_Pourcentage) ? "$Fr_Pourcentage" : NULL;
 
$array_lib = !empty($_POST['Fr_Libelle']) ? $_POST['Fr_Libelle'] : NULL;
$array_qte = !empty($_POST['Fr_Quantite']) ? $_POST['Fr_Quantite'] : NULL;
$array_unt = !empty($_POST['Fr_PrixUnit']) ? $_POST['Fr_PrixUnit'] : NULL;
$array_tot = !empty($_POST['Fr_PrixTotal']) ? $_POST['Fr_PrixTotal'] : NULL;
 
foreach($array_lib as $key => $value)
	{
	$FR_PDO = $pdo->prepare("INSERT INTO tb_user_voucher (Nom, Carte, Pseudo, Email, Bon, Date, Total, Pourcentage, Libelle, Quantite, PrixUnit, PrixTotal)
VALUES (:Fr_Nom, :Fr_Carte, :Fr_Pseudo, :Fr_Email, :Fr_Code, :Fr_Date, :Fr_Total, :Fr_Pourcentage, '" . $value . "', '" . $array_qte[$key] . "', '" . $array_unt[$key] . "', '" . $array_tot[$key] . "')");
	$FR_PDO->execute(array(
		"Fr_Nom" => $Fr_Nom,
		"Fr_Carte" => $Fr_Carte,
		"Fr_Pseudo" => $Fr_Pseudo,
		"Fr_Email" => $Fr_Email,
		"Fr_Code" => $Fr_Code,
		"Fr_Date" => $Fr_Date,
		"Fr_Total" => $Fr_Total,
		"Fr_Pourcentage" => $Fr_Pourcentage,
		"array_lib" => $value,
		"array_qte" => $array_qte[$key],
		"array_unt" => $array_unt[$key],
		"array_tot" => $array_tot[$key]
	));
	}
et voici le message d'erreur :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
Fatal error: Uncaught PDOException:
SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens in /home/voucher_ajouter.php:62
Stack trace: #0 /home/voucher_ajouter.php(62):
PDOStatement->execute(Array) #1 {main} thrown in /home/voucher_ajouter.php on line 62
Merci de votre aide.