Bueno comienzo haciendo preguntas, el primer archivo lo de option podria ponerse simplemente con esto
Código PHP:
<select name="ordendestacado"><? for($x = 0; $x<=21; $x++)
{ ?>
<option value="<?=$x?>" <?php if($rows['ordendestacado'] == $x)?> selected="selected"><?=$x?></option>
<?
}
?></select>
Bueno ahora si el segundo archivo, lo siguiente esta mal:
Código PHP:
if($_GET[$i])
Ya que eso no puede ser posible porque nunca le mandas una variable i o no que yo vea en el form e igualmente con lo demas de $ordendestacado, eso tampoco nunca lo declaras para ello hay que utilizar el $_POST, el igual con $count.
El codigo hasta ahi esta mal jeje
EDIT::
Fijate aver si asi te sirve
Código PHP:
Ver original<?php
$host="localhost";
$username="root";
$password="";
$db_name="sanandre_sap";
$sql="select *
from sistema
where `destacado` = 'Si'
and `estado` = 'Activo'";
?>
<table width="80%" border="0" cellspacing="1" cellpadding="0">
<form name="form" method="post">
<tr>
<td>
<table width="80%" border="0" cellspacing="1" cellpadding="0">
<tr>
<td align="center"><strong>Id</strong></td>
<td align="center"><strong>Tipo de Inmueble</strong></td>
<td align="center"><strong>Tipo de Operacion</strong></td>
<td align="center"><strong>Barrio</strong></td>
<td align="center"><strong>Calle</strong></td>
<td align="center"><strong>Altura</strong></td>
<td align="center"><strong>Actual</strong></td>
<td align="center"><strong>Orden</strong></td>
</tr>
<?php
$i = 0;
$r[$i]['id'] = $rows['id'];
$r[$i]['ordendestacado'] = $rows['ordendestacado'];
$i++;
?>
<tr>
<td align="center"><?php $id[]=$rows['id']; ?><?php echo $rows['id']; ?></td>
<td align="center"><?php echo $rows['tipoinmueble']; ?></td>
<td align="center"><?php echo $rows['tipodeoperacion']; ?></td>
<td align="center"><?php echo $rows['barrio']; ?></td>
<td align="center"><?php echo $rows['calle']; ?></td>
<td align="center"><?php echo $rows['altura']; ?></td>
<td align="center"><?php echo $rows['ordendestacado']; ?></td>
<td align="center"><select name="ordendestacado"><? for($x = 0; $x<=21; $x++)
{ ?>
<option value="<?=$x?>" <?php if($rows['ordendestacado'] == $x)?> selected="selected"><?=$x?></option>
<?
}
?></select></td>
</tr>
<?php
}
?>
<tr>
<td colspan="4" align="center"><input type="Submit" name="Submit" value="Submit"></td>
</tr>
</table>
</td>
</tr>
</form>
</table>
<?php
if(isset($_POST['Submit'])) {
for($x=0;$x<$count;$x++){
$sql1="UPDATE sistema SET ordendestacado='".$r[$x]['ordendestacado']."' WHERE id='".$r[$x]['id']."'";
}
if($result1){
}
}
?>