Problemas con un formulario

[email protected] ("Irantzu Leunda Biskarret")
Newsgroups php.general.es
Message-ID <36283BE0930645E9B183DBC68C3D8B8E@Irantzu>
Hola, hago una consulta de datos por fechas y las muestro, luego con checkbox tengo que cambiar un dato en la base de datos cuando el registro está seleccionado, no se por que motivo el array me llega vacío.

Pongo aqui el pedazo de código. Como siempre, muchas gracias a todos.

$result = mysql_query( "select * FROM contenido where fecha>='$fecha1' and fecha<='$fecha2' and ubicacion='NAVARRA' order by fecha asc", $link);

  echo "<br><br><span class='tituloprincipal'>NAVARRA</span>";
  $campos=array();
  echo "<form action='eliminar_fichas.php' method='post'>";
        while ($row=mysql_fetch_array($result))
{
  $num=$row["num"];
  $fecha=$row["fecha"];
  $formatfecha=formateo_fecha($fecha);
  echo "<tr><td><input type='checkbox' name='<? campos[$num] ?>' value='no'><a href=../ventana_cambiosfecha.php?num=$num><span class='textonormal'>".$row['titulo'];
  echo "</span></a></span></td>";
  echo "<td><span class='negrita'>".$formatfecha;
  echo "</span></td></tr>";
  echo "<tr><td colspan=2 ><span class='titulocapitulo'>Cambios realizados en esta ficha: </span>".$row['cambios']."</td></tr>";

}
echo "<tr><td><input type='submit' value='eliminar'></td></tr>";
echo "</form>";

Aqui el eliminar_ficha.php

<?php
if(!empty($_POST['campos'])) {
  $aLista=array_keys($_POST['campos']);
  echo "<pre>";
  print_r($aLista);
  echo "</pre>";
  foreach($aLista as $iId) {
   $sQuery="UPDATE FROM tabla where id=$iId";
  }
 }
?>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.