So, guys, I'm just starting to learn how to mess with php and I'm trying to make a registration system that will register on it. I already managed a lot, I could connect the bank, I was able to save data in phpmyadmin through a form. However, when I want to show the user the data registered in a table on a web page, it does not show even the data being saved in the database. Can someone help me? I'll be thankful ;-; '
<title>Sistema de Registro de Atividades</title>
</head>
<body>
<h1>Sistema de Registro de Atividades</h1>
<p><a href="form-add.php">Adicionar atividade</a></p>
<h2>Lista de atividades</h2>
<p>Total de de atividades: <?php echo $total ?></p>
<?php if ($total > 0): ?>
<table width="50%" border="1">
<thead>
<tr>
<th>Nome da Atividade</th>
<th>duracao</th>
<th>descricao</th>
</tr>
</thead>
<tbody>
<?php while ($user = $stmt->fetchall(PDO::FETCH_ASSOC)): ?>
<tr>
<td><?php echo $user['atividade_nome'] ?></td>
<td><?php echo $user['duracao'] ?></td>
<td><?php echo $user['descricao'] ?></td>
<td>
<a href="form-edit.php?id=<?php echo $user['id'] ?>">Editar</a>
<a href="delete.php?id=<?php echo $user['id'] ?>" onclick="return confirm('Tem certeza de que deseja remover esta atividade?');">Remover</a>
</td>
</tr>
<?php endwhile; ?>
</tbody>
</table>
<?php else: ?>
<p>Nenhum usuário registrado</p>
<?php endif; ?>
</body>
'