<?php include "../model/Conecta.php"; include "../model/beans/FaleConosco.php"; include "../model/dao/DaoFaleConosco.php"; $today = date("j/ n/ Y"); $faleConosco = new FaleConosco(); $faleConosco->setNome($_POST["nome"]); $faleConosco->setEmail($_POST["email"]); $faleConosco->setComentario($_POST["mensagem"]); $faleConosco->setData($today); //include("mailFaleConosco.php"); //print_r($faleConosco); $conexao = new Conecta(); $daoFaleConosco = new DaoFaleConosco($faleConosco, $conexao); $daoFaleConosco->inserir(); //print_r($daoFaleConosco->visualizarTudo()); header("Location: ../../aprobas/faleconosco.php");
<?php include "model/Conecta.php"; include "model/beans/FaleConosco.php"; include "model/dao/DaoFaleConosco.php"; $faleConosco = new FaleConosco(); $conexao = new Conecta(); $daoFaleConosco = new DaoFaleConosco($faleConosco, $conexao); $dados = $daoFaleConosco->visualizarTudo(); /* print "<pre>"; print_r($dados); print "</pre>"; **/
<?php include "../model/Conecta.php"; include "../model/beans/FaleConosco.php"; include "../model/dao/DaoFaleConosco.php"; $faleConosco = new FaleConosco(); $conexao = new Conecta(); $daoFaleConosco = new DaoFaleConosco($faleConosco, $conexao); $daoFaleConosco->deletar($_GET['id']); header("Location: ../view/cms/faleConosco.php"); /* print "<pre>"; print_r($dados); print "</pre>"; **/