I have two selects, the second select being totally dependent on the first. I would like to make the filter, but I can not see a solution. Could someone help me?
<!-- Todas as tecnologias -->
<div class="mws-form-block">
<div class="mws-form-row">
<div class="mws-form-item large">
<select name="rTecn" onChange="document.formFilter.submit();">
<option value="">[ Todas as tecnologias ]</option>
<?php
$TECN = getTecnologias();
while ($TECNOLOGIA = mysql_fetch_array($TECN)) {
?>
<option value="<?php echo $TECNOLOGIA["TECNOLOGIA"]; ?>" <?php echo ($TECNOLOGIA["TECNOLOGIA"] == $rTecn) ? 'selected' : '' ?>><?php echo $TECNOLOGIA["TECNOLOGIA"]; ?></option>
<?php
}
?>
</select>
</div>
</div>
</div>
<!-- Todos os fornecedores -->
<div class="mws-form-block">
<div class="mws-form-row">
<div class="mws-form-item large">
<select name="rForn" onChange="document.formFilter.submit();">
<option value="">[ Todos os fornecedores ]</option>
<?php
$conexao->setSQL("SELECT * FROM tab_aro_pcd_riscos, tab_aro_pcd_fornecedores WHERE aro_riscos_mfir = aro_forn_mfir GROUP BY aro_forn_mfir ORDER BY aro_forn_nome ASC");
$resultado = $conexao->Consultar();
while ($forn = mysql_fetch_array($resultado)) {
?>
<option value="<?php echo $forn["aro_forn_mfir"]; ?>" <?php echo ($forn["aro_forn_mfir"] == $rForn) ? 'selected' : '' ?>><?php echo $forn["aro_forn_mfir"] . " - " . $forn["aro_forn_nome"]; ?></option>
<?php
}
?>
</select>
</div>
</div>
</div>