To list all the questions registered in the database I use the following code:
<?php
include_once "../../conexao.php";
$sql_questionario = "SELECT * FROM 'questionario_perguntas' ORDER BY RAND()";
$query_questionario = mysqli_query($conn, $sql_questionario);
while ($dados_questionario = mysqli_fetch_assoc($query_questionario)) {
?>
<fieldset>
<div class="divider-text gap-top-20 gap-bottom-45">
<span>Questão X de Y</span>
</div>
<!-- start way to communicate -->
<div class="unit check" id="">
<div class="group">
<h2><?php echo "$dados_questionario[pergunta]";?></h2>
</div>
</div>
</fieldset>
Someone to help me? Thanks.