Gracias mauritosuarez!!!
Código PHP:
<?php
session_start();
if(empty($_SESSION) or $_SESSION["perfil"]=="colaborador"){
}
elseif(empty($_SESSION) or $_SESSION["perfil"]=="admin") {
Header("Location: index-admin.php");
}
else { Header("Location: index.php");
}
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<script language="javascript" type="text/javascript" src="js/jquery-1.2.6.min.js"></script>
<script language="javascript" type="text/javascript" src="js/datetimepicker.js"></script>
<script language="javascript" type="text/javascript" src="js/jquery.js"></script>
<script language="javascript" type="text/javascript" src="js/jquery.Rut.js"></script>
<script language="javascript" type="text/javascript" src="js/jquery.Rut.min.js"></script>
<script language="javascript" type="text/javascript" src="js/jquery.validate.js"></script>
<script language="javascript" type="text/javascript" src="js/jquery-2.1.1.min.js"></script>
<script language="javascript" type="text/javascript" src="jquery.Rut.js"></script>
<link rel="stylesheet" type="text/css" href="css/bootstrap.css">
<link rel="stylesheet" type="text/css" href="css/DT_bootstrap.css">
<style type="text/css" media="print">
.nover {display:none}
</style>
</head>
<body>
<nav class="navbar navbar-default" role="navigation">
<div class="container-fluid">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" >Facturacion</a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
<li><a href="ingresa-factu.php">Ingresar</a></li>
<li><a href="mostrarFacturas.php">Ver Facturas</a></li>
<li class="active"><a href="informe.php">Informes</a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li><a href="logout.php">Cerrar Sesion</a></li>
</ul>
</div><!-- /.navbar-collapse -->
</div><!-- /.container-fluid -->
</nav>
<span class="Estilo2">
<div class="datagrid">
<?php
/* CONECTAR CON BASE DE DATOS **************** */
$con = mysql_connect("localhost","root","");
if (!$con){die('ERROR DE CONEXION CON MYSQL: ' . mysql_error());}
/* ********************************************** */
/********* CONECTA CON LA BASE DE DATOS **************** */
$database = mysql_select_db("conta",$con);
mysql_query("SET NAMES 'UTF8'");
if (!$database){die('ERROR CONEXION CON BD: '.mysql_error());}
/* ********************************************** */
$sql = "Select SUM(monto_Doc) AS suma, code_doc as tipocuenta, MONTH(fecha_Doc) as fechan , code_Doc
FROM boletas WHERE tipo_Cuenta = '".$titulo."'
and MONTH(fecha_Doc) BETWEEN '".$fecha1."' AND '".$fecha2."' GROUP BY code_Doc, fechan ORDER BY fechan";
$result = mysql_query ($sql);
// verificamos que no haya error
if (! $result){
echo "La consulta SQL contiene errores.".mysql_error();
exit();
}
else {
//obtenemos los datos resultado de la consulta
while ($row = mysql_fetch_array($result)){ ?>
<table class='table'>
<tbody>
<tr>
<th>Usuario</th>
<th><?php echo $row['code_doc']; ?></th>
</tr>
<?php for($i=0; $i<sizeof($row); $i++) { ?>
<tr>
<td><?php echo $row[$i]['fechan"']; ?></td>
<td><?php echo $row[$i]['suma']; ?></td>
</tr>
<? } ?>
</tbody>
</table>
<? } ?>
</div>
<center><input type="button" name="imprimir" value="Generar Informe" onclick="window.print();" class="nover"></center>
</span>
</body>
</html>
Me tira error en la ultima linea, en la etiqueta html, eso significa que me falta una llave de cierre?