Ver Mensaje Individual
  #3 (permalink)  
Antiguo 27/03/2010, 17:21
vili86
 
Fecha de Ingreso: septiembre-2009
Mensajes: 281
Antigüedad: 14 años, 7 meses
Puntos: 0
Respuesta: variables de sesion

En la primera parte del codigo me funciona correctamente hice pruebas
Código PHP:
echo $_SESSION['categoria'];
echo 
$categoria
Y me imprimen los dos de manera correcta pero ahora cuando llamo a este scritp
Código PHP:
<?php
       session_start
();
       include(
'pdf/class.ezpdf.php');
    
$categoria $_SESSION['categoria'];    
                
$club $_SESSION['club'];     
                
$pdf = & new Cezpdf('letter','landscape');
      
$pdf->selectFont('pdf/fonts/Helvetica');
      
$pdf->ezSetCmMargins(1,1,1.5,1.5);// margenes
      
$pdf->ezStartPageNumbers(500,18,10,'','{PAGENUM} de {TOTALPAGENUM}',1);
      
      
$all $pdf->openObject();
      
$pdf->saveState();
      
$pdf->setStrokeColor(0,0,0,1);
      
$pdf->line(20,30,750,30);
      
$pdf->line(20,585,750,585);
      
$pdf->addText(20,590,10,'Asociacion Chuquisaqueña de Futbol *** ACHF *** ');
      
$pdf->addText(650,590,10,'Detalle de Jugador(res)');
      
$pdf->addText(20,18,10,'Dirección: Calle Junin 744 - Telfs. 64-51271- 64-55460 - FAX.(04) 64-55460','Pagina');
      
$pdf->restoreState();
      
$pdf->closeObject();
       
// termina las lineas
      
$pdf->addObject($all,'all');
        
      include(
'conectar.php');
      
$link Conectarse();
      
//$conexion = mysql_connect("localhost", "root", "");
      //mysql_select_db("bd_asociacion", $conexion);
      
$queEmp "SELECT *  FROM jugadores Where  club='$club'  ";
      
$resEmp mysql_query($queEmp$link) or die(mysql_error());
      
$totEmp mysql_num_rows($resEmp);
      
// creo un while para generar la tabla con sus campos

      
$ixx 0;
      while(
$datatmp mysql_fetch_assoc($resEmp)) {
              
$ixx $ixx+1;
             
$data[] = array_merge($datatmp, array('num'=>$ixx));
        
      
$titles = array(
                       
'num'=>'<b>Nº</b>',
                       
'nombre'=>'<b>Nombres</b>',
                       
'paterno'=>'<b>Ape. Paterno</b>',
                       
'materno'=>'<b>Ape. Materno</b>',
                       
'categoria'=>'<b>Categoria </b>',
                       
'nacionalidad'=>'<b>Nacionalidad </b>',
                       
'club'=>'<b>Club</b>',
                       
'ci'=>'<b>CI</b>'
                     
);
     
     
$options = array(
                      
'shadeCol'=>array(0.9,0.9,0.9),
                      
'xOrientation'=>'center',
                      
'width'=>700
                     
);
     }
     
$txttit "<b>BICENTENARIO DEL PRIMER GRITO DE LIBERTAD EN AMERICA 1809-2009\n SUCRE-BOLIVIA </b>\n";
    
     
$pdf->ezText($txttit12, array(justification=>center));
     
$pdf->ezTable($data$titles''$options);
     
$pdf->ezText("\n\n\n"18);
     
$pdf->ezText("<b>Fecha:</b> ".date("d/m/Y"), 5, array(justification=>left));
     
$pdf->ezText("<b>Hora:</b>  ".date("H:i:s")."\n\n",5, array(justification=>left));
     
$pdf->ezStream();
    
?>
¿COMO PODRIA HACER LA PRUEBA EN ESTE SCRIPT PARA SABER SI MIS VARIABLES DE SESSION ESTAN LLEGANDO YA QUE PONGO UN echo $categoria o $club pero me vota el pdf vacio solamente con su diseño predeterminado?

Última edición por vili86; 27/03/2010 a las 17:22 Razón: falta de datos