Ver Mensaje Individual
  #25 (permalink)  
Antiguo 12/09/2008, 12:43
Avatar de the_web_saint
the_web_saint
 
Fecha de Ingreso: mayo-2008
Ubicación: localhost/tierra/america/panama
Mensajes: 1.229
Antigüedad: 16 años
Puntos: 43
Respuesta: problema con checkbok y el boton eliminar

Hice una prueba sencilla, a ver si localizas el error:
esto es el form
Código PHP:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>
<form name="id[]" action="borrar.php" method="post">
<?php
echo "<tr>";
for(
$i=0$i<5$i++)
{
    echo 
'<td><input type="checkbox" name="registro[]" value="'.$i.'">'.$i.'</td>';
}
echo
'<input type="submit" value="Enviar">';
echo 
"<tr>";
?>
</form>
</body>
</html>
Esto es el otro archivo:
Código PHP:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>
<?php

if(isset($_POST['registro']))
{
    foreach (
$_POST['registro'] as $llave
    { 
    echo
"<script>alert(\"$llave\")</script>";
    
//mysql_query("delete from actividades where id_tabla = $llave",$link);
    
}
}
//header("Location: borraractividades.php");
?> 
</body>
</html>
Suerte
me cuenta como te fue
__________________
..::The Saint::..
El pesimista se queja del viento; el optimista espera que cambie; el realista ajusta las velas.