Si pero introduzco en el form diferentes palabras y me modifica todo por igual segun el ultimo form...
Mira...
Este es el codigo:
Código PHP:
include("../config.php");
if (isset($_POST['modificar'])) {
$horario = $_POST['horario'];
$titulo = $_POST['titulo'];
$ids_a_modificar = array(1,2);
$in = implode(',', $ids_a_modificar);
$sql = "UPDATE radio_progra set horario='$horario', titulo='$titulo' WHERE id IN($in)";
$res = mysql_query($sql) or die("Error: ".mysql_error());
echo '<h2>Se han guardado los cambios introducidos.</h2>';
}
?>
<table width="100%" border="0" cellspacing="0" cellpadding="5">
<tr>
<td><form action="index.php" method="post" enctype="multipart/form-data" name="form1" id="form1">
<? $con = mysql_query("SELECT * FROM radio_progra ORDER BY id DESC") or die("Error: ".mysql_error());
if(mysql_num_rows($con) == NULL) {
echo 'No existe ninguna programacion.';
}else{
echo '<table width="100" border="0" align="center" cellpadding="0" cellspacing="5">
';
while($datos = mysql_fetch_array($con)) {
echo '<tr><td width="1"><input name="horario" type="text" class="file" size="10" maxlength="10" value="'.$datos[horario].'"></td>
<td width="99"><input name="titulo" type="text" class="file" size="70" value="'.$datos[titulo].'"></td></tr>';
}
echo '
</table><br><div align="center"><input type="submit" name="modificar" value="Guardar cambios" class="boton"></div>';
}
?>
</form></td>
</tr>
</table>