I don't understand why the foreach displays two times the same row ..
if(isset($_POST['idSalarie'])){
$displayForm = $bdd->prepare(
'SELECT user_prenom, user_nom, poste_nom
FROM USER
INNER JOIN USER_POSTE_SERVICE ON USER.user_id= USER_POSTE_SERVICE.ups_poste_id
INNER JOIN POSTE ON USER_POSTE_SERVICE. ups_poste_id = POSTE.poste_id
WHERE user_id = :idSalarie
ORDER BY user_nom ASC');
$displayForm->bindParam(':idSalarie', $_POST['idSalarie']);
$displayForm->execute();
$resDisplayForm=$displayForm->fetch();
foreach ($resDisplayForm as $key => $value) {
echo '<input type="text" name="'.$key.'" value="'.$value.'"/>';
}
}
UPDATE : this is what the console displays