getMessage()); } // Insertion des paramètres GET dans la base if (!empty($_GET)) { $stmt = $pdo->prepare("INSERT INTO test (param_key, param_value) VALUES (:key, :value)"); foreach ($_GET as $key => $value) { $stmt->execute(['key' => $key, 'value' => $value]); } } // Récupération des données pour affichage $params = $pdo->query("SELECT * FROM test ORDER BY created_at DESC")->fetchAll(PDO::FETCH_ASSOC); ?>
| ID | Clé | Valeur | Date |
|---|---|---|---|
| = htmlspecialchars($row['id']) ?> | = htmlspecialchars($row['param_key']) ?> | = htmlspecialchars($row['param_value']) ?> | = htmlspecialchars($row['created_at']) ?> |