Bonjour à tous
voici ma requête pdo.

es ce que je peux directement utiliser $_post dans mon cas ??
Merci par avance

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
$majpdo= $pdo->prepare('INSERT INTO pscol_edtprof_coll (id_edt, id_prof, jour, M1, M2, M3, M4,M5, AM1, AM2, AM3, AM4, AM5, AM6) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? ,? ,?)');
    $majpdo->bindValue(1, $_POST['id_edt'], PDO::PARAM_int);
    $majpdo->bindValue(2, $_POST['id_prof'], PDO::PARAM_int);
    $majpdo->bindValue(3, $_POST['jour'], PDO::PARAM_STR);
    $majpdo->bindValue(4, $_POST['M1'], PDO::PARAM_STR);
    $majpdo->bindValue(5, $_POST['M2'], PDO::PARAM_STR);
    $majpdo->bindValue(6, $_POST['M3'], PDO::PARAM_STR);
    $majpdo->bindValue(7, $_POST['M4'], PDO::PARAM_STR);
    $majpdo->bindValue(8, $_POST['M5'], PDO::PARAM_STR);
    $majpdo->bindValue(9, $_POST['AM1'], PDO::PARAM_STR);
    $majpdo->bindValue(10, $_POST['AM2'], PDO::PARAM_STR);
    $majpdo->bindValue(11, $_POST['AM3'], PDO::PARAM_STR);
    $majpdo->bindValue(12, $_POST['AM4'], PDO::PARAM_STR);
    $majpdo->bindValue(13, $_POST['AM5'], PDO::PARAM_STR);
    $majpdo->bindValue(14, $_POST['AM6'], PDO::PARAM_STR);
    $majpdo->execute();