Situation: We have three tables in the same form the first one contains the radio button:
<td> <input required="required"
value="Evento" name="tipo" id="evento" type="radio">
<label for="tipo">Evento.</label> <input required="required" value="Viagem" name="tipo" id="viagem" type="radio">
<label for="tipo">Viagem</label></td>
At the moment the two tables are shown on the screen, I want to show only one that depends on the choice.
How could if
be done to show certain table?
For example
if (code) {
travel table
}
if (othercode) {
events table
}
Is it possible to do by PHP or have to be Javascript?
I've already tried <?php if($_POST['tipo']=='evento') : ?>
tabela em HTML que eu quero mostrar
<?php endif; ?>
but it gives me the error: Undefined index: type