<?php session_start();
if(!empty($_SESSION['user_connect_id']))
{ require('../../config.php');

date_default_timezone_set('Africa/Algiers');
$d_aj=date('Y-m-d H:i:s');
$id=mysqli_real_escape_string($con,htmlspecialchars(trim($_POST['id']))) ;
$motif=mysqli_real_escape_string($con,htmlspecialchars(trim($_POST['motif']))) ;
$poids=mysqli_real_escape_string($con,htmlspecialchars(trim($_POST['poids']))) ;
$taille=mysqli_real_escape_string($con,htmlspecialchars(trim($_POST['taille']))) ;
$temperature=mysqli_real_escape_string($con,htmlspecialchars(trim($_POST['temperature']))) ;
$frequence_cardiaque=mysqli_real_escape_string($con,htmlspecialchars(trim($_POST['frequence_cardiaque']))) ;
$glycemie=mysqli_real_escape_string($con,htmlspecialchars(trim($_POST['glycemie']))) ;
$diagnostic_medical=mysqli_real_escape_string($con,htmlspecialchars(trim($_POST['diagnostic_medical']))) ;


$sql1 = "UPDATE consultations SET
        motif='$motif',
        poids='$poids',
        taille='$taille',
        temperature='$temperature',
        frequence_cardiaque='$frequence_cardiaque',
        glycemie='$glycemie',
        diagnostic_medical='$diagnostic_medical',
        date_modification='$d_aj'
        where id='$id'";
        
            if(mysqli_query($con,$sql1)){echo 1; }else{
              echo 0;
               }
    }

?>
       
