Ver Mensaje Individual
  #10 (permalink)  
Antiguo 12/09/2008, 11:00
Rockzilla
 
Fecha de Ingreso: julio-2008
Mensajes: 129
Antigüedad: 15 años, 10 meses
Puntos: 0
Respuesta: problema con checkbok y el boton eliminar

mi formulario quedo asi
Código PHP:
<?php 
   
include("conext.php"); 
   
$link=Conectarse(); 
   
$result=mysql_query("select * from actividades",$link); 
  
?> 
<form id="id" name="registro[]" method="get" action="borraract.php"> 
  <TABLE width="1026" BORDER=1 CELLPADDING=1 CELLSPACING=1>    
    <TR background="gradient_tcat.gif"> 
      <TD width="100" height="41"><span class="Estilo5">&nbsp;<B>dependencia</B></span></TD> 
      <TD width="67"><span class="Estilo5">&nbsp;<B>Actividad</B>&nbsp;</span></TD> 
      <TD width="109"><span class="Estilo5">&nbsp;<B>fecha de inicio</B>&nbsp;</span></TD> 
      <TD width="42"><span class="Estilo5">&nbsp;<B>fecha</B>&nbsp;</span></TD> 
      <TD width="45"><span class="Estilo5">&nbsp;<B>fecha</B></span></TD> 
      <TD width="54"><span class="Estilo5">&nbsp;<B>monto</B></span></TD> 
      <TD width="49"><span class="Estilo5">&nbsp;<B>unidad</B>&nbsp;</span></TD> 
      <TD width="84"><span class="Estilo5">&nbsp;<B>programado</B>&nbsp;</span></TD> 
      <TD width="46"><span class="Estilo5">&nbsp;<B>tarea</B></span></TD> 
      <TD width="75"><span class="Estilo5">&nbsp;<B>trimestre</B></span></TD> 
      <TD width="65"><span class="Estilo5">&nbsp;<B>calcular</B></span></TD> 
      <TD width="78"><span class="Estilo5">&nbsp;<B>estimado</B></span></TD> 
      <TD width="88"><span class="Estilo5">&nbsp;<B>Borrar</B>&nbsp;</span></TD></TR> 

  <?php 

while($row mysql_fetch_array($result)) { 
   
printf('<tr>[color="Red"]%s[/color]<td>&nbsp;%s</td><td>&nbsp;%s</td><td>&nbsp;%s</td><td>&nbsp;%s</td><td>&nbsp;%s</td><td>&nbsp;%s</td><td>&nbsp;%s</td><td>&nbsp;%s</td><td>&nbsp;%s</td><td>&nbsp;%s</td><td>&nbsp;%s</td><td>&nbsp;%s&nbsp;</td><td><a href="borraract.php?id=%d">eliminar 
</a><td><input type="checkbox" name="registro[]" value="$row["llave"]"  /></td></td></tr>'
,$row["llave"],$row["dependencia"],$row["actividad"],$row["f_i"],$row["f_f"],$row["f_r"],$row["monto"],$row["unidad"],$row["programado"],$row["tarea"],$row["trimestre"],$row["calcular"],$row["estimado"],$row["id_tabla"]); 

mysql_free_result($result); 
mysql_close($link);  

?> 

<input type="submit" name="Submit" value="eliminar"/> 
</form> 
</table> 
<p align="center">&nbsp;</p> 
</body> 
</html>
y mi proceso asi
Código PHP:
<?php
include("conext.php");
$link=Conectarse();

if(isset(
$_GET['id']))
{
$id=$_GET['id'];
mysql_query("delete from actividades where id_tabla = $id",$link);

if(isset(
$_POST['registro']))
{
foreach (
$POST['registro'] as $llave

mysql_query("delete from actividades where id_tabla = $llave",$link);

}
}
header("Location: borraractividades.php");
?>
y todavia no me realiza nada no se que tiene