Ver Mensaje Individual
  #4 (permalink)  
Antiguo 07/03/2007, 23:50
El Patrón.
 
Fecha de Ingreso: abril-2006
Ubicación: Colombia
Mensajes: 648
Antigüedad: 18 años
Puntos: 3
Re: Mostrar contenido de una tabla junto a un checkbox

Hola

Bueno, seria asi

Código PHP:

<?
$link 
mysql_connect("localhost","","");
mysql_select_db("prueba");
?>
<table>
<form action="guardar.php">
<tr>
<?
$i
=0;
$query mysql_query("SELECT * FROM municipios",$link);
while (
$r mysql_fetch_array($query))
{
?>
<td>
<input type="checkbox" name="cod_municipio<?=$r[0]?>" value="<?=$r[0]?>"><?=$r[1]?>
<input type="hidden" name="nom_municipio<?=$r[0]?>" value="<?=$r[1]?>">
<? 
$i
++;
if(
$i%3==0)
echo 
'</td><tr>'
}
?>
</tr>
<tr>
<td>
<input type="submit">
</td>
</tr>
</form>
</table>
Suerte