public static function MettreAJourMembre($post) { $bdd = Bdd::Connect(); $updateMembre = $bdd->prepare('UPDATE membre SET pseudo= :1, email= :2, mdp= :3, nom= :4, prenom= :5, adress= :6, cp= :7, ville= :8, tel= :9, tel_port= :10 WHERE id_membre= :11'); var_dump($updateMembre->execute(array(':1' => $post['pseudo'], ':2' => $post['confirmemail'], ':3' => $post['confirmNewMdp'], ':4' => $post['nom'], ':5' => $post['prenom'], ':6' => $post['adresse'], ':7' => $post['cp'], ':8' => $post['ville'], ':9' => $post['telfixe'], ':10' => $post['telport'], ':11' => $_SESSION['membre']->get_id()))); $membre = array('id_membre' => $_SESSION['membre']->get_id(), 'pseudo' => $post['pseudo'], 'email' => $post['confirmemail'], 'mdp' => $post['confirmNewMdp'], 'nom' => $post['nom'], 'prenom' => $post['prenom'], 'adress' => $post['adresse'], 'cp' => $post['cp'], 'ville' => $post['ville'], 'tel' => $post['telfixe'], 'tel_port' => $post['telport'], 'admin' => $_SESSION['membre']->get_admin()); var_dump($membre); return new Membre($membre); }
public static function CreerArchive($info) { $bdd = Bdd::Connect(); $panier = $_SESSION['panier']->getCart(); foreach ($panier as $key => $pan) { $creatPanier = $bdd->prepare('INSERT INTO historique (id_membre,nom_produits,quantite_produits,prix_produits,prix_total) VALUES ( ?, ?, ?, ?, ?) '); var_dump($creatPanier->execute(array($_SESSION['membre']->get_id(), $pan['nom'], $pan['qte'], $pan['prix'], $_SESSION['panier']->getPrixTotal()))); } }