0){
foreach ($rdv as $row) {
$dateStr = $row["rdv_date"];
$dateString = new DateTime($dateStr);
$date = $dateString->format('d F Y');
$uglyTime = $row["rdv_time"];
$dateTime = new DateTime($uglyTime);
$time = $dateTime->format('H:i');
$patient = $row["patient"];
$mail = $row["p_mail"];
$phone = $row["p_phone"];
if ($mail != null){
echo '
';
echo '';
echo '
';
echo "
$patient
";
echo "
$mail";
echo '
';
echo "
$phone";
echo '
';
echo '
';
} else {
echo '
';
echo '';
echo '
';
echo "
Vous n'avez pas de" . "
" . "patient pour ce créneau
";
echo '';
echo '
';
}
}
} else {
echo 'error';
}
} catch (PDOException $e) {
error_log('Database query error: ' . $e->getMessage());
echo "Error fetching data from the database";
} ?>