PHP obtient la mise à jour SQL de la session
$sql = "UPDATE profile SET name = '".$name.'" WHERE userid = '".$_SESSION['userid].'";
$update = $connection->query($sql);
if($update){
$_SESSION['name']=$name;
}
Borma