You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
752 B
21 lines
752 B
3 years ago
|
<?php
|
||
|
$decode = json_decode($_POST['value'], TRUE);
|
||
|
$bdd = new PDO('mysql:host=localhost;dbname=ticket;charset:utf8', 'root', '');
|
||
|
$request = 'UPDATE pannes SET
|
||
|
dates = "' .$decode["dates"] .'",
|
||
|
details = "' .$decode["details"] .'",
|
||
|
lieu = "' .$decode["lieu"] .'",
|
||
|
salle = "' .$decode["salle"] .'",
|
||
|
pos = "' .$decode["pos"] .'",
|
||
|
materiel = "' .$decode["materiel"] .'",
|
||
|
marque = "' .$decode["marque"] .'",
|
||
|
model = "' .$decode["model"] .'",
|
||
|
nserie = "' .$decode["nserie"] .'",
|
||
|
demandeur = "' .$decode["demandeur"] .'",
|
||
|
traitement = "' .$decode["traitement"] .'"
|
||
|
WHERE ID= "' .$decode['id'] .'"';
|
||
|
$update = $bdd->query($request);
|
||
|
|
||
|
$traitement = $bdd->query("SELECT * FROM pannes WHERE ID=" .$decode['id']);
|
||
|
print_r(json_encode($traitement->fetch()));
|
||
|
?>
|