I'm doing a fill-in form with two selections, but I want the second option to come up depending on the result of what I've selected in the first one, so it's going to be:
<div class="form-group">
<label>Categoria: </label>
<select class="form-control" name="categoria">
<option>Seleccione... </option>
<option value="Bolsa de Trabajo">Bolsa de Trabajo</option>
<option value="Compra y Venta">Compra y Venta</option>
</select>
<div class="form-group">
<label>Subcategoria: </label>
<select class="form-control" name="subcategoria">
<?php
if(categoria == null){
?>
<option>Seleccione... </option>
<?php
}else if(categoria == "Bolsa de Trabajo"){
?>
<option>Seleccione... </option>
<option>Busco Empleo</option>
<?php
}else if(categoria == "Compra y Venta"){
?>
<option>Seleccione... </option>
<option>Busco Producto</option>
<?php
}
?>
</select>
for example if in the first select I select buying and selling I want the second select to go out the options of looking for work as it is shown in the code, what should be corrected so that it can be achieved? Greetings