0
Hello, I have a problem to count the records of a table in the database and show it as in this example: 1(X) of 10(Y) when clicking on "next" of the form would be 2(X) of 10(Y) and so on, as the form progresses it increases +1 in the value of X.
To list all questions registered in the database 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? Hug.
Your case is the same as a pagination, with the peculiarity of being 1 item per page.
– Bacco
Please put the link here of the answer that serves for my case. Poi was very vague this justification. Thank you
– Agência Ozweb
The link is on the yellow board above the question
– Bacco