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 36 37
|
<?php
global $bdd;
if ( isset($_POST['TVA']) AND $_POST['TVA'] == 'on')
{
$TVA = 1;
}
else
{
$TVA = 0;
}
echo $_POST['target'];
//préparation et execution de la requête
$req_ajout = $bdd->prepare('UPDATE occasions SET Titre = :Titre, Prix = :Prix, TVA = :TVA, KM = :KM, Immatriculation = :Immatriculation, Puissance = :Puissance, Cylindree = :Cylindree, Carburant = :Carburant, CO2 = :CO2, Boite = :Boite, Transmission = :Transmission, Couleur = :Couleur, Options_short = :Options_short, Option_long = :Option_long)
WHERE ID = :target');
echo "Je suis passé ici";
$req_ajout->execute(array(
'Titre' => $_POST['Titre'],
'Prix' => $_POST['Prix'],
'TVA' => $TVA,
'KM' => $_POST['KM'],
'Immatriculation' => $_POST['Immatriculation'],
'Puissance' => $_POST['Puissance'],
'Cylindree' => $_POST['Cylindree'],
'Carburant' => $_POST['Carburant'],
'CO2' => $_POST['CO2'],
'Boite' => $_POST['Boite'],
'Transmission' => $_POST['Transmission'],
'Couleur' => $_POST['Couleur'],
'Options_short' => $_POST['Options_short'],
'Option_long' => $_POST['Option_long'],
'target' => $_POST['target']
));
?> |
Partager