Ver Mensaje Individual
  #1 (permalink)  
Antiguo 16/05/2008, 09:56
congas1983
 
Fecha de Ingreso: septiembre-2007
Mensajes: 47
Antigüedad: 16 años, 7 meses
Puntos: 0
problema para generar pdf en php

buenas amigos

este mi problema deseo realizar esta consulta y el resultado de estase vea en un archivo pdf

este es el codigo

<?
$protocolo='Protocolo';
$cn=mysql_connect("localhost","root","")or die ("no se puede establecer la conexion");

mysql_select_db("sisbagir");

$cons="SELECT * FROM integrante where Escuadron ='$protocolo'";

$resultado=mysql_query($cons);
$numfilas=mysql_num_rows($resultado);
if ($numfilas==0)
{
echo "no existe registro";
}
else

{

?>
<table width="950" height="41" border="1" align="center" cellpadding="1" cellspacing="1" bordercolor="#0080C0" bgcolor="#CCCCCC">
<tr>
<th width="44">
Cedula
</th>
<th width="59">
Nombres
</th>
<th width="41">
F-Nac
</th>
<th width="32">
Edad
</th>
<th width="57">
Telefono
</th>
<th width="46">
Celular
</th>
<th width="62">
Direccion
</th>
<th width="42">
Barrio
</th>
<th width="21">
Rh
</th>
<th width="26">
Eps
</th>
<th width="67">
F-ingreso
</th>
<th width="70"><div align="center" class="Estilo83">
Institucion
</th> <th width="32"><div align="center" class="Estilo83">
Sexo
</th>
</tr>
<?

while ($numfilas=mysql_fetch_array($resultado))
{
?><tr>
<td height="20">
<? echo $numfilas["cedula"]; ?>
</td><td>
<? echo $numfilas["nombres"]; ?>
</td><td>
<? echo $numfilas["fechanac"]; ?>
</td><td>
<? echo $numfilas["edad"]; ?>
</td><td>
<? echo $numfilas["telefono"]; ?>
</td><td>
<? echo $numfilas["movil"]; ?>
</td><td>
<? echo $numfilas["direccion"];?>
</td><td>
<? echo $numfilas["barrio"]; ?>
</td>
<td>
<? echo $numfilas["rh"]; ?>
</td>
<td>
<? echo $numfilas["eps"]; ?>
</td>
<td>
<? echo $numfilas["ingreso"]; ?>
</td>
<td>
<? echo $numfilas["institucion"]; ?>
</td>
<td>
<? echo $numfilas["sexo"];?>
</td>
</tr>
<? require('fpdf.php');
$pdf=new FPDF();
$pdf->AddPage();
$pdf->SetFont('Arial','B',16);
$pdf->Cell(40,10,'$numfilas');
$pdf->Output();
}
?>
</table>
<?
}
?>

ESTE ES EL ERROR QUE ME SALE CUANDO EJECUTO LA PAGINA PHP

Warning: Cannot modify header information - headers already sent by (output started at C:\Archivos de programa\xampp\htdocs\SICE\prueba.php:37) in C:\Archivos de programa\xampp\php\pear\fpdf.php on line 1022
FPDF error: Some data has already been output to browser, can't send PDF file


COMO PUEDO SOLUCIONAR ESTE TEMA GRACIAS