I have a page that connects to the database and brings information correctly, however I would like to put information on a form using the select field, but I'm having some difficulties if someone can help me follow my code.
<?php
require_once 'init.php';
// abre a conexão
$PDO = db_connect();
// SQL para selecionar os registros
$sql = "SELECT cliente FROM clientes";
// seleciona os registros
$stmt = $PDO->prepare($sql);
$stmt->execute();
?>
<html>
<head>
<meta charset="utf-8">
<title>Lab</title>
</head>
<body>
<h1>Lab</h1>
<?php while ($user = $stmt->fetch(PDO::FETCH_ASSOC)): ?>
<?php echo $user['cliente'] ?>
<?php endwhile; ?>
</body>
</html>