$updateOk = false;
 }
 if (!isset($userGender) || !$userGender) {
     $errors = 'Please select a gender';
     $updateOk = false;
 }
 if (!isset($userBirthdate) || !$userBirthdate) {
     $errors = 'filled the birthdate field';
     $updateOk = false;
 }
 if (!isset($userMail) || !$userMail) {
     $errors = 'Put a valid email';
     $updateOk = false;
 }
 if (!empty($_POST['pwd'])) {
     $currentPwd = $updateProfil->getpwd($pdo);
     if (!isset($userPassword) || strlen($userPassword) < 6) {
         $errors = ' You need to have 6 chars in your password';
         $updateOk = false;
     }
     if (!isset($passwordConfirm) || $passwordConfirm != $userPassword) {
         $errors = ' Please put the same password';
         $updateOk = false;
     }
     if (!isset($passwordActual) || sha1($passwordActual) != $currentPwd['password']) {
         $errors = ' Please set Your current password ';
         $updateOk = false;
     }
 }
 if (!$updateOk) {
     http_response_code(400);