PHP - utilizar check box en reporte de tablas

 
Vista:

utilizar check box en reporte de tablas

Publicado por jhean carlos (114 intervenciones) el 02/10/2014 00:11:26
como estan tengo un reporte que se segera segun el SQL

en php me nuestra un listado en una tabla, pero abajo tengo un paginador para que vaya a la siguiente pagina

desde aca envio
-----------------------------------------------------
<form action="ejemplo.php" method="get" >
<table class="display table table-bordered table-striped table-hover general-table" id="dynamic-table" style="width:100%;" >

<thead>
<tr>
<th width="14%"><h6 align="center" style="color:#666"><b>Codigo Proyecto</b></h6></th>
<th width="14%"><h6 align="center" style="color:#666"><b>_____Codigo_SISIN_____</b></h6></th>
<th width="10%"><h6 align="center" style="color:#666"><b>Unidad</b></h6></th>
<th width="11%"><h6 align="center" style="color:#666"><b>Descripción del Proyecto</b></h6></th>
<th width="10%"><h6 align="center" style="color:#666"><b>Alcance</b></h6></th>
<th width="20%"><h6 align="center" style="color:#666"><b>_____________Contrato___________</b></h6></th>
<th width="20%"><h6 align="center" style="color:#666"><b>________Monto_Bs.______</b></h6></th>
<th width="15%"><h6 align="center" style="color:#666"><b>Enlazar a mi Registro</b></h6></th>
<th width="15%"><h6 align="center" style="color:#666"><b>Seleccione</b></h6></th>
</tr>
</thead>
<tbody>
<?php
$sql="SELECT
T1.proyId,
T1.proySISIN,
T1.unidId,
T1.proyDescrip,
T1.proyAlcance,
T2.contrId,
T2.contrato,
T2.tContratoActualBs
FROM
proyectos T1
INNER JOIN proy_empresa T2 ON T1.proyId = T2.proyId
INNER JOIN
(SELECT MIN(contrId) contrId
FROM
proy_empresa
GROUP BY
proyId) TM ON T2.contrId = TM.contrId
WHERE
T1.proyId = T2.proyId AND
T1.unidId NOT LIKE 'GCT' AND
T1.unidId NOT LIKE 'GAF' AND
T1.unidId NOT LIKE 'GG' AND
T1.unidId NOT LIKE 'RRPP' AND
T1.unidId NOT LIKE 'SIS' AND
T1.unidId NOT LIKE 'UGC' AND
T1.unidId NOT LIKE 'UCONTR' AND
T1.unidId NOT LIKE 'USG' AND
T1.unidId NOT LIKE 'GAF/FE' AND
T1.unidId NOT LIKE 'GAF/BS'
";
$res=mysql_query($sql,$conexion);
while ($dato=mysql_fetch_array($res))
{
?>
<tr>

<td><h6><?php echo utf8_encode($dato["proyId"]) ?></h6></td>
<td><h6 align="right"><?php echo utf8_encode($dato["proySISIN"]) ?></h6></td>
<td><h6><?php echo utf8_encode($dato["unidId"]) ?></h6></td>
<td><h6><?php echo utf8_encode($dato["proyDescrip"]) ?></h6></td>
<td><h6><?php echo utf8_encode($dato["proyAlcance"]) ?></h6></td>
<td><h6><?php echo utf8_encode($dato["contrato"]) ?></h6></td>
<td><h6 align="right"><?php echo number_format(($dato["tContratoActualBs"]),2,',','.') ?> Bs.</h6></td>


<td><div align="center"><a href="actualizar_vigencia.php?cod_usuario=<?php echo $cod_usuario ?>"><img border="0" src="images/actualizar.png"onmouseover="this.src='images/actualizar.png';" onMouseOut="this.src='images/actualizar.png';"width="25" height="25" onClick="return confirm('¿Esta seguro de cambiar la vigencia?')"></a></div></td>
<td>

<input name="dato[]" type="checkbox" value="<?php echo $dato["proyId"] ?>">
</td>

<?php
}
?>
</tr>
</tbody>

</table>
<input name="send" type="submit" id="send" value="Enviar!">
</form>
--------------------------------------------------------------------------------------
en este codigo lo recibo


<?php


if (($_GET['dato']&& is_array($_GET['dato'])))
{
$postre = $_GET['dato'];
$n = count($postre);
$i = 0;

echo "proyectos que enlazare: rn" .
"<ol>";
while ($i < $n)
{
echo "<li>{$postre[$i]}</li> rn";
$i++;
}
echo "</ol>";
}


?>
-------------------------------------------------------------------------------------
pero como es en paginas
digamos estoy pagina 1

selecciono alguna fila y hago un clic en un checkbox

siguiente pagina 2

selecciono alguna fila y hago un clic en un checkbox

pero al enviar solo me envia en la pagina que me encuentro no envia lo que seleccione en la anterior
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder