I'm in need of a help.
I need to make a Search button, pick the parameters of some selects (combobox) and update a table below the filters.
But I'm not sure how to do this, to press each click on the button.
Here is the code I've already done:
<?php
require_once("conecta.php");
?>
<table>
<tr>
<td>
Marca:<select>
<option>Selecione...</option>
<?php
$query = mysql_query("SELECT * FROM sis_marca");
while($linha = mysql_fetch_array($query)) { ?>
<option value="<?php echo $linha['cod_marca'] ?>"><?php echo $linha['desc_marca'] ?></option>
<?php } ?>
</select>
</td>
<td>
Modelo:<select>
<option>Selecione...</option>
<?php
$query = mysql_query("SELECT * FROM sis_modelo");
while($linha = mysql_fetch_array($query)) { ?>
<option value="<?php echo $linha['seq_modelo'] ?>"><?php echo $linha['desc_modelo'] ?></option>
<?php } ?>
</select>
</td>
<td>
Tipo Modelo:<select>
<option>Selecione...</option>
<?php
$query = mysql_query("SELECT * FROM sis_tipo_modelo");
while($linha = mysql_fetch_array($query)) { ?>
<option value="<?php echo $linha['seq_tipo'] ?>"><?php echo $linha['desc_tipo'] ?></option>
<?php } ?>
</select>
</td>
<td>
<input type="submit" value="Buscar" name="g_marca" />
</td>
</tr>
</table>
<table border="0">
<tr bgcolor="#CCCCCC">
<td width="300"><b>Marca</b></td>
<td width="300"><b>Modelo</b></td>
</tr>
<?php
$query = "SELECT * FROM sis_tipo_modelo_oleo";
$resultado = mysql_query($query);
while ($linha = mysql_fetch_array($resultado)) {
$cod_marca = $linha["cod_marca"];
$cod_modelo= $linha["cod_modelo"];
?>
<tr>
<td><? echo $linha['cod_marca']; ?></td>
<td><? echo $linha['cod_modelo']; ?></td>
</tr>
<?php
}
?>