Current File : /home/digitaw/Ycof/admin/upd_client.php
<?php

require 'configuration.php';
if ($_SERVER['REQUEST_METHOD'] == 'POST') { 
  if (isset($_POST['modifier'])) { 
 $nom = $_POST['nom'];
 $prenom = $_POST['prenom'];
 $email = $_POST['email'];
 $phone = $_POST['phone'];
 $username = $_POST['username'];
 if (!empty($nom) && !empty($prenom) && !empty($email) && !empty($phone) && !empty($username)) {
  $query="update utilisateurs set nom='$nom',prenom='$prenom',email='$email',phone='$phone',username='$username' where email='$email'";
  $connection->query($query); 
  $verification=$connection->query($query);
  if ($verification) {
    $msg = "Modification reussie !";
    $_SESSION['msg'] = "<div class='alert alert-success alert-dismissible fade show ' role='alert'>
    <svg xmlns='http://www.w3.org/2000/svg' style='margin-right:10px' width='20' height='20' fill='currentColor' class='bi bi-check2-all' viewBox='0 0 16 16'>
    <path d='M12.354 4.354a.5.5 0 0 0-.708-.708L5 10.293 1.854 7.146a.5.5 0 1 0-.708.708l3.5 3.5a.5.5 0 0 0 .708 0l7-7zm-4.208 7-.896-.897.707-.707.543.543 6.646-6.647a.5.5 0 0 1 .708.708l-7 7a.5.5 0 0 1-.708 0z'/>
    <path d='m5.354 7.146.896.897-.707.707-.897-.896a.5.5 0 1 1 .708-.708z'/>
  </svg>
         <strong style='font-size:17px;'>$msg</strong>
         <button type='button' class='btn-close' data-bs-dismiss='alert' aria-label='Close'></button>
     </div>";
     header("Location: clients.php"); 
  }
 } 
 } 
} 

 ?>