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 33 34 35
|
<?php
if (isset($_POST['Modifier']) && isset($_POST['id'])) {
try
{
$bdd = new PDO('mysql:host=localhost;dbname=ao', 'root', '');
$bdd->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING);
$req = $bdd->prepare('UPDATE consultation SET collectivite = :nvcollectivite, departement = :nvdepartement, intitule = :nvintitule, secteur = :nvsecteur , echeance = :nvecheance, decision = :nvdecision, etat = :nvetat, responsable = :nvresponsable, partenaire = :nvpartenaire, source = :nvsource, format = :nvformat, demande = :nvdemande WHERE id = :id');
$req->execute(array(
":nvcollectivite" =>$_POST['nvcollectivite'],
':nvdepartement' => $_POST['nvdepartement'],
':nvintitule' => $_POST['nvintitule'],
':nvsecteur' => $_POST['nvsecteur'],
':nvecheance' => $_POST['nvecheance'],
':nvdecision' => $_POST['nvdecision'],
':nvetat' => $_POST['nvetat'],
':nvresponsable' => $_POST['nvresponsable'],
':nvpartenaire' => $_POST['nvpartenaire'],
':nvsource' => $_POST['nvsource'],
':nvformat' => $_POST['nvformat'],
':nvdemande' => $_POST['nvdemande'],
':id' => $_POST['id']
));
}
catch(Exception $e)
{
die('Erreur : '.$e->getMessage());
}
}
//header('Location: Consultation.php');
echo("La modification a été correctement effectuée")
?> |