1
I have a form , where in the action I send the information to a PHP page , however , I need that when the user click a button send this form data to a page x and when click the other button go to page y .
Follows my code :
<?php include("cabecalho_busca.php")?>
<br>
<!-- ##### Breadcrumb Area Start ##### -->
<div class="mag-breadcrumb py-3">
</div>
<!-- ##### Breadcrumb Area End ##### -->
<div class="container">
<form method="post" action="conexaobd.php">
<div class="row align-items-center justify-content-center">
<div class="row align-items-center justify-content-center">
<div class="col-md-2 pt-3">
<div class="form-group ">
<label for="filial">Filial 01</label>
<select class="form-control" name="filial" id="filial">
<option value="">Bahia</option>
<option value="">Pernambuco</option>
<option value="">Rio de Janeiro</option>
<option value="">São Paulo</option>
<option value="">Vitoria da Conquista</option>
</select>
</div>
</div>
<div class="col-md-2 pt-3">
<div class="form-group">
<label for="filial1">Filial 02</label>
<select class="form-control" name="filial1" id="filial1">
<option value="">Bahia</option>
<option value="">Pernambuco</option>
<option value="">Rio de Janeiro</option>
<option value="">São Paulo</option>
<option value="">Vitoria da Conquista</option>
</select>
</div>
</div>
<div class="col-md-2 pt-3">
<div class="form-group">
<label for="exampleInputEmail1">Data Inicial</label>
<input type="date" class="form-control" id="data_inicio" name="data_inicio">
</div>
</div>
<div class="col-md-2 pt-3">
<div class="form-group">
<label for="exampleInputEmail1">Data Final</label>
<input type="date" class="form-control" id="data_final" name="data_final">
</div>
</div>
<div class="col-md-2">
<br>
<button type="submit" class="btn btn-primary">Consultar</button>
</div>
<div class="col-md-2">
<br>
<button type="submit" class="btn btn-primary">Gerar</button>
</div>
</div>
</div>
</form>
</div>
<br>
<!-- ##### Breadcrumb Area Start ##### -->
<div class="mag-breadcrumb py-3">
</div>
<!-- ##### Breadcrumb Area End ##### -->
<?php include("rodape.php")?>
Sincerely unaware such attribute. very useful, especially for those who do not know JS.
– Vinicius De Jesus