function __construct() { $this->id = $_POST['id']; $this->cnx = parent::getCnx(); $this->mesQuestions = Sondage::getQuestions($this->cnx, $this->id); $this->nomFichier = "statistiques_sondage_" . $this->id . ".csv"; }
function __construct() { $this->mesQuestions = Sondage::getQuestions(parent::getCnx(), $_SESSION['id']); if (isset($_REQUEST['action'])) { if ($_REQUEST['action'] == 'suppr') { $this->mesQuestions[$_REQUEST['id']]->supprimerQuestion(parent::getCnx()); } } }
public function enregistrerSondage() { $sondage = new Sondage($_POST['nom'], $_POST['type']); $sondage->validerSondage(parent::getCnx(), $_POST['sujet']); }