Código:
<?php include ('back/conexion.php'); ?> <script language="JavaScript" type="text/JavaScript"> <!-- function MM_jumpMenu(targ,selObj,restore){ //v3.0 eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'"); if (restore) selObj.selectedIndex=0; } //--> </script> <div><form name="form1" method="post" action=""> <? $conexion = new conexion(); $result_2 = mysql_query("select id_sede,nom_sede from buscar_sedes order by id_sede desc",$conexion-> conectar()); if (mysql_num_rows($result_2) > "0") { ?> <select name="id" onChange="MM_jumpMenu('parent',this,0)"> <option selected>Seleccione...</option> <? while ($row = mysql_fetch_array($result_2)) { echo "<option value='buscar_sede.php?id=$row[id_sede]'>$row[nom_sede]</option>\n"; } ?> </select> <? } else { echo "<center>No ha seleccionado ninguna sede</center>"; } ?> </form></div>