20 lines
460 B
PHP
Executable File
20 lines
460 B
PHP
Executable File
<?php
|
|
// ob_start();
|
|
session_start();
|
|
|
|
require_once("../db.inc.php");
|
|
|
|
// Gestion des modifications
|
|
if (isset($_POST['message'])) { // Ajout du message dans la BD
|
|
$message=$_POST['message'];
|
|
$login=$_SESSION['login'];
|
|
$query = "UPDATE clients SET message='$message' WHERE name='$login'";
|
|
pg_query($dbconn, $query) or die('Échec de la requête : ' . pg_last_error());
|
|
}
|
|
|
|
// Ferme la connexion
|
|
pg_close($dbconn);
|
|
|
|
header('Location: print_clients.php');
|
|
?>
|