0
I have a form in which the user will be able to select several subjects, being then selected a subject, through PHP I will pull from the database by SELECT
and I will show on the screen with echo
the results.
My code :
<form id = "questions_form" method= "post">
<select class= "box-select" name="select1">
<option value="value1">Estrutura de Banco de Dados</option>
</select>
<input type="submit" name="submit" value="Resultado"/>
<div class = "resultados-lista">
<?php
$query = "SELECT def_conteudo FROM conteudo WHERE nome_conteudo = 'Estrutura de Banco de Dados' ";
$result = mysqli_query($con,$query);
if(isset($_POST['select1'])){
$select1 = $_POST['select1'];
switch ($select1) {
case 'value1':
echo "<li>" . $fetch[0] . "</li>";
break;
default:
# código
break;
}
}
?>
</div>
</form>
</div>
</div>
But because many of the stories have more than 30 questions, it is very bad and unviable that they are shown on the same page. On account of this, I would like to give a target
on a new page to only show these questions. But I don’t know how I can do this.