Ver Mensaje Individual
  #1 (permalink)  
Antiguo 30/07/2007, 16:17
winner22
 
Fecha de Ingreso: julio-2007
Mensajes: 18
Antigüedad: 16 años, 9 meses
Puntos: 0
como guardar checks con boton guardar

tengo una consulta..niños..
como hago pa marcar varios checksboxs(asignaturas escogidas) y despues colocar solo un boton guardar...y al apretar el boton..obviamente me guarde las opciones que tengo escogidas..

aca tengo el codigo, pero no se donde colocar el boton guardar para ke no se me pierda por el while ke tengo arriba..
ahi ta esa parte
gracias..



<?php
//ver planes



$btningresar=true;
if($btningresar)
{//1

echo $plan."";
echo $nibel_asignatura."";

conectar();

echo $kx_plan;
echo $nibel_asignatura;


$sql="SELECT * FROM asignatura WHERE kx_plan='$plan' and nibel_asignatura='$nibel_asignatura'" ;
$rs_u=pg_query($sql);
if (pg_num_rows($rs_u)>0)
{//2
echo "<table border=1>";
echo "<tr>";
echo "<td>Codigo</td>";
echo "<td>Asignatura</td>";
echo "<td>NIVEL</td>";
echo "<td>agregar</td>";


echo "</tr>";

while($u=pg_fetch_array($rs_u))
{ //3

echo "<tr>";
echo "<form action='Copia_abrir_asignatura_plan.php'>";





echo "<td>".$u[kx_asignatura]."</td>";
echo "<td>".$u[nombre_asignatura]."</td>";
echo "<td>".$u[nibel_asignatura]."</td>";

echo "<input type='hidden' name='asignatura' value=".$u[kx_asignatura].">";
echo "<input type='hidden' name='plan' value=".$u[kx_plan].">";
echo "<input type='hidden' name='plan' value=".$u[nibel_asignatura].">";


echo "<td><input type='checkbox' name='checkbox' value='checkbox'></td>";

echo "<td><input type='submit' name='agregar' value='Agregar' onclick=alert('seccion&nbsp;Agregada');></td>";



echo "</form>";
echo "</tr>";

} //3





} //2 if
echo "</tr></table>";
}// 1 if