Ver Mensaje Individual
  #4 (permalink)  
Antiguo 20/10/2011, 20:27
ranchoteca
 
Fecha de Ingreso: febrero-2010
Mensajes: 152
Antigüedad: 16 años, 8 meses
Puntos: 2
Exclamación Respuesta: Mandar variable atravez de url

Asi lo hago yo...
Código PHP:
$html = "<table id=Exportar width=100% border=1px>";
$html .= '<thead>';
$html .= '<tr>';
$html .= '<td align="center" class="columnas" width="5%" nowrap="nowrap"><div align="center">'. idempleado .'</div></td>';
$html .= '<td align="center" class="columnas" width="45%"><div align="center">'. Nombres .'</div></td>';
$html .= '<td align="center" class="columnas"  width="20%"><div align="center">'. Departamento .'</div></td>';
$html .= '</tr>';
$html .= '</thead>';
$html .= '<tbody>';

/**contenido de la tabla*/
foreach ($this->datos as $dato) : 
$html .= '<tr>';
$html .= '<td align="center">'. $dato->idempleado .'</td>';
$html .= '<td>'. $dato->nombres .'</td>';
$html .= '<td align="center">'. $dato->departamento .'</td>';
$html .= '</tr>';
endforeach; 
$html .= '</tbody>';
$html .= '</table>'; 

Código HTML:
<form action="components/com_pag/views/pag/tmpl/prueba_pdf.php" method="post" id="formulario">

<input type="hidden" value="[PHP]echo $html;[/PHP]" name="contenido" />
<input type="submit" value="Enviar" name="Enviar">

</form> 
/******ARCHIVO prueba_pdf.php*******/

Código PHP:
$cont = $_GET['contenido'];
echo 
"LA TABLA RESULTANTE ES!!:" . $cont;