![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
15/04/2010, 10:59
|
| | Fecha de Ingreso: abril-2010
Mensajes: 10
Antigüedad: 14 años, 10 meses Puntos: 0 | |
Excel Exportar buenas tengo el siguiente codigo
<?php
include_once('adodb/adodb.inc.php');
include_once('adodb/adodb-pager.inc.php');
$db = NewADOConnection('oci8');
$db->Connect('localhost','ivhan35','ivan','xe');
$sql = "select * from usuario "
$pager = new ADODB_Pager($db,$sql);
$pager->Render($rows_per_page=5);
?>
<form action=excel.php method = POST>
<input type="hidden" name="export value="<?php echo $excel;?>"/>
<input type = "submit" value =" Importar">
</form>
<?php
y este excel.php:
<?php
$excel=$_POST['export'];
header('Content-type: application/vnd.ms-excel');
$archivo=date("d_m_Y_H_i_s");
header("Content-Disposition: attachment; filename=".$archivo.".xls");
header("Pragma: no-cache");
header("Expires: 0");
?>
pero al ejecutarlo exporta el archivo pero al abrirlo no hay resultados de la consulta, alguien que me me pueda ayudar gracias |