function __construct($nomFichier) { $this->nomFichier = $nomFichier; $tampon = explode("_", $nomFichier); //ID DU SONDAGE EN SEPARANT A PARTIR DU _ $this->id = $tampon[1]; $this->cnx = Connexion::seConnecter("mysql", "localhost", "sondage", "root", ""); $this->mesQuestions = $this->getQuestions(); }
function __construct() { $question = new Questions($_SESSION['id'], $_REQUEST['libelle'], $_REQUEST['type']); $question->ajouterQuestions(Connexion::seConnecter("mysql", "localhost", "sondage", "root", "")); }
protected function getCnx() { return $this->cnx = Connexion::seConnecter("mysql", "localhost", "sondage", "root", ""); }