foreach ($user->getEntreprises() as $key => $entreprise) {
        if ($entreprise->getId() == $_REQUEST['id']) {
            $entrepriseChoisi = $entreprise;
        }
    }
    if ($_REQUEST['nbPostes'] >= 1 && $dateFin != false && $dateDebut != false && $entreprise != null) {
        $stage = new Stage();
        $entreprise = $user->getEntreprises();
        $stage->setTitre($_REQUEST['titre']);
        $stage->setDescription($_REQUEST['description']);
        $stage->setGratification($_REQUEST['gratification']);
        $stage->setDateDebut($dateDebut);
        $stage->setDateFin($dateFin);
        $stage->setDomaine($_REQUEST['domaine']);
        $stage->setEntreprise($entrepriseChoisi);
        $stage->setNbPoste($_REQUEST['nbPostes']);
        $stage->save();
        $pdo = myPDO::getInstance();
        $req = $pdo->prepare(<<<SQL
\t    \tSELECT numStage
\t    \tFROM Stage
\t    \tORDER BY dateCreation DESC LIMIT 1
SQL
);
        $req->execute();
        // mail
        // récupération des adresses
        $reqAdresses = $pdo->prepare(<<<SQL
\t\t\tSELECT mail
\t\t\tFROM Etudiant
\t\t\tWHERE 1