Ver Mensaje Individual
  #1 (permalink)  
Antiguo 10/02/2005, 12:09
Avatar de jmfp26
jmfp26
 
Fecha de Ingreso: diciembre-2003
Mensajes: 162
Antigüedad: 20 años, 4 meses
Puntos: 2
Mostrar Datos dependiendo de 2 Select

Hola Grupo:


Quiero mostrar datos segun dos select, pero no se como hacerlo.

Código PHP:
<form name="form" method="post" action="index.php">
  <table border=0 width="61%" cellspacing="0" cellpadding="1" align="center" bgcolor="#bbc3d3">
    <tr valign="top">
      <td width="12%" font color="black"><b>Provincia</b></td>
      <td width="37%">
        <select name="provincia"><option value="null">TODOS</option>
          <option value="1">Malaga</option>
          <option value="2">Sevilla</option>
          <option value="3">Logro&ntilde;o</option>
          <option value="4">Madrid</option>
          <option value="5">Alicante</option>

        </select>
      <td width="10%"><font color="black"><b>ZONA:</b></font>      
      <td width="25%"><font color="black">
      <select name="zonas">
        <option value="null" <?php if ($estado=="null") echo "selected"?>>TODAS</option>
        <option value="0" <?php if ($zonas=="0") echo "selected"?>>NORTE</option>
        <option value="1" <?php if ($zonas=="1") echo "selected"?>>MADRID</option>
        <option value="2" <?php if ($zonas=="2") echo "selected"?>>SUR</option>
      </select>
      </font>
      </td>
          <td width="16%">
      </td>
    </tr>
    <tr>
          <td></td>
        <td></td>
        <td></td>
        <td></td>
        <td width="16%" align="center"><input name="submit" type="submit" class="modificar" value="Aplicar"></td>
    </tr>

Se que tengo que hacer varias sql, y luego unirlas dependiendo del valor del select.

Pero no se por donde empezar. Si alguien me puede orientar se lo agradeceria.

Saludos Gracias