rendered paste body<?header("Content-type: application/vnd.ms-excel");header("Content-Disposition: attachment; filename=excel.xls");session_start();if(!$_SESSION['id']){ header("Location: login.php");}include("conexion.inc.php");include ("calendario/calendario.php");include ("funciones_fecha.php"); //session_name("ot");//session_start();if($_GET['tipo']=='proveedores' && $_GET['act']=='exportar'){ $cadena="select * from proveedores"; $consulta = mysql_query($cadena,$cn); print '<table>'; while ( $row = mysql_fetch_array()){ print '<tr>'; foreach ($row as $key => $value){ print '<td>' . $value . '</td>'; } print '</tr>' } print '</table>';}?>