Ver Mensaje Individual
  #7 (permalink)  
Antiguo 13/01/2004, 02:03
Avatar de pereztroff
pereztroff
 
Fecha de Ingreso: junio-2002
Ubicación: En la Internet.
Mensajes: 4.068
Antigüedad: 21 años, 10 meses
Puntos: 5
tengo error, pero voy bien?
<body>
<form action="" method="get">
<select name="ciudad" size="1">
<option selected>Madrid</option>
<option>Sevilla</option>
</select>
Código PHP:
  <?php $con mysql_connect("localhost""xxxx""xxxxx")or die("Connect Error: ".mysql_error());
$db="xxxxxxxxxx";
mysql_select_db($db$con)or die("Connect Error: ".mysql_error());

$result mysql_db_query($db,"select * from patrimonio WHERE ciudad='".$_POST['municipio']."'";

while (
$row mysql_fetch_array($result)) {
if(
$row['municipio'] == ciudad)
                echo
"<option value=\"$row[municipio]\" SELECTED>$row[municipio]</option>\n";
            
        }

        
?>
</form>
</body>