WIP: tout fonctionne meme le scroll il ne reste plus que ordreJFG
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
require_once __DIR__ . '/db.php';
|
||||
header('Content-Type: application/json');
|
||||
|
||||
$db = (new App\Database\Database())->getConnection();
|
||||
|
||||
// Récupération des données POST
|
||||
$id = $_POST['id'];
|
||||
$nom = $_POST['nom'];
|
||||
$ticker = $_POST['ticker'];
|
||||
|
||||
try {
|
||||
$stmt = $db->prepare("UPDATE ordres SET nom = ?, ticker = ? WHERE id = ?");
|
||||
$stmt->execute([$nom, $ticker, $id]);
|
||||
|
||||
echo json_encode(['success' => true]);
|
||||
} catch (Exception $e) {
|
||||
echo json_encode(['success' => false, 'message' => $e->getMessage()]);
|
||||
}
|
||||
@@ -38,7 +38,6 @@ $ordres = fetchOrdreGF($connection);
|
||||
|
||||
require_once __DIR__ . '/header.php';
|
||||
?>
|
||||
|
||||
<section class="ordregf-shell">
|
||||
<div class="ordregf-card">
|
||||
<header class="ordregf-card-header" style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 28px;">
|
||||
|
||||
Reference in New Issue
Block a user