Exemplo n.º 1
0
        }
    }
    public function ejecutarConsultaDevolviendoArray($query)
    {
        //require('coneccion.php');
        $conect = new Conexion();
        if (!($result = mysqli_query($conect->conectarse(), $query))) {
            die('Ocurrio un error ejecutando la consulta');
            return 0;
        } else {
            $Rs = mysqli_fetch_array($result);
            return $Rs;
        }
    }
}
if (isset($_POST['Enviar'])) {
    $asunto = $_POST['asunto'];
    $texto = $_POST['cuerpoForm'];
    $dest = $_POST['dest'];
    $us = $_POST['user'];
    $es = $_POST['est'];
    $msg = new mensajeria();
    if ($msg->enviarNuevoMensaje($asunto, $texto, $dest, $us, $es)) {
        echo '<html><head></head><body>';
        echo '<script language="javascript">';
        echo 'alert("Se ha enviado el mensaje correctamente")';
        echo 'window.location="mensajes.php"';
        echo '</script>';
        echo '</body></html>';
    }
}