Código PHP:
<form id="form1" name="form1" method="post" action="act_url_jcce.php">
<table width="100%" border="0" cellspacing="2" cellpadding="0">
<tr>
<td width="22%"> </td>
<td width="60%"> </td>
<td width="10%"> </td>
<td width="8%"> </td>
</tr>
<?php do { ?><tr>
<td><input name="munic[<?php echo $row_jcce['munic']; ?>]" type="text" id="munic" value="<?php echo $row_jcce['munic']; ?>" size="20" /></td>
<td><input name="reg[<?php echo $row_jcce['id']; ?>]" type="hidden" id="id" / value="reg[<?php echo $row_jcce['id']; ?>]">
<input name="url[<?php echo $row_jcce['url']; ?>]" type="text" id="url" value="<?php echo $row_jcce['url']; ?>" size="50" /></td>
<td><p>.</p>
<p>
<input name="sitio" type="hidden" id="sitio" value="<?php echo $row_jcce['sitio']; ?>" />
</p></td>
<td> </td>
</tr>
<?php } while ($row_jcce = mysql_fetch_assoc($jcce)); ?>
<tr>
<td><input name="act_jcce" type="submit" id="act_jcce" value="Actualizar" /></td>
<td> </td>
<td> </td>
<td> </td>
</tr>
</table>
</form>
<!-- es esta es la página que procesa los datos -->
<?php require_once('../../Connections/nue.php'); ?>
<?php
/// esto es una array que capta la variable del formulario
if(!empty($_POST['reg'])){
$registros= array_keys($_POST['reg']);
$registros= implode("','", $registros);
$registros= "'" . $registros . "'";
$mun= array_keys($_POST['munic']);
$mun= implode("','", $mun);
$mun= "'" . $mun . "'";
$url= array_keys($_POST['url']);
$url= implode("','", $url);
$url= "'" . $url . "'";
$updateSQL = "UPDATE url_jcce SET munic=$mun, url=$url WHERE id IN ($registros)";
mysql_select_db($database_nue, $nue);
$Result1 = mysql_query($updateSQL, $nue) or die(mysql_error());
echo "se ha modificado los datos satisfactoriamente";
// no me sale la función header("Location: link.php?cmg");
}
?>