<!DOCTYPE html> <!-- To change this license header, choose License Headers in Project Properties. To change this template file, choose Tools | Templates and open the template in the editor. --> <html> <head> <meta charset="UTF-8"> <title></title> </head> <body> <?php try { //Inicializamos la conexion a la DB $preguntaDal = new PreguntaDal(); $preguntas = new Preguntas(); //Capturamos los valores de la pagina $preguntas->setNombreCliente($_POST['txt_nombre']); $preguntas->setEmail($_POST['txt_email']); $preguntas->setTelefonoContacto($_POST['txt_phone']); $preguntas->setPregunta($_POST['txt_pregunta']); //Nos Conectamos a la BD if ($preguntaDal->insertPregunta($preguntas)) { //Redirige a la pagina $preguntaDal->enviarMail($preguntas); header('Location: ../mensaje_enviado.php'); } else { //Redirige pagina error echo '("Error")'; }
</div> <!--inbox--> <div class="col-sm-10"> <table class="table table-hover" > <thead> <tr class="bg-primary row"> <td class="col-sm-2"><i class="fa fa-user"></i> Nombre</td> <td class="col-sm-4"><i class="fa fa-question"></i> Pregunta</td> <td class="col-sm-2"><i class="fa fa-envelope"></i> Email</td> <td class="col-sm-2"><i class="fa fa-phone"></i> Fono</td> <td class="col-sm-2"><i class="fa fa-external-link"></i> Contestar</td> </tr> </thead> <tbody> <?php $preguntaDal = new PreguntaDal(); $preguntaDal->listadoPreguntas(); ?> </tbody> </table> </div> </div> </div> <footer class="footer"> <div class="container"> <!--Creative Commons License--> <div class="row"> <div class="col-sm-2"></div> <div class="col-sm-8 text-left"> <h6> <small>