Esempio n. 1
0
function profil($id)
{
    //On vérifie que le paramètre est bien un ID
    if ($id != null && $id == intval($id) && Consultation::exists($id)) {
        //Gestion du POST
        if (isset($_POST['posted'])) {
        }
        //Inclusion de la page
        $rdv = Consultation::select($id);
        $tabMedecin = Medecin::selectAll();
        $tabPatient = Patient::selectAll();
        $pConsult = Patient::select($rdv['id_patient']);
        $mConsult = Medecin::selectByID($rdv['id_medecin']);
        include VIEW . 'modifierConsultation.php';
    } else {
        unset($_POST);
        //Supprimer le post pour éviter les conflits avec l'autre page
        afficher();
        echo "<p id='mErreur'>Aucune consultation correspondante<p>";
    }
}