public function comprobarCampos()
    {
        if (empty($this->idUser) || empty($this->idComment) || empty($this->comentarioText)) {
            return false;
        } else {
            return true;
        }
    }
    //Insertamos los datos en la base de datos SQL
    public function insertarDatosSQL()
    {
        $this->comentario->insertarComentario($this->idUser, $this->date, $this->comentarioText, $this->producto);
    }
}
?>
            
           
        
            <?php 
session_start();
$_SESSION['fechaComentario'] = date("Y-m-d h:i:sa");
$datos = new Datos();
$datos->getDatos();
//$datos->mostrarDatos();
$datos->insertarDatosSQL();
$url = $datos->getUrl();
header("Location: index.php");
?>
           
    </body>
</html>