seems you are asking how to loop over the result from an sql query to dynamically produce a section of html markup?
since you are using the PDO extension, i recommend that you fetch all the data from the query into an appropriately named php variable, then test and loop over that variable at the correct location in the html document -
<?php
// in the code querying for the data
$result_data = $stmt->fetchAll();
// at the point of outputting the data
if(empty($result_data))
{
echo 'There is no data to display.';
}
else
{?>
<form action="" method="get">
<label for="ListSaint">Choisis le Saint qui correspond a la date souhaité :</label>
<input list="ListSaints" name="ListSaint" id="ListSaint">
<datalist id="ListSaints">
<?php
foreach($result_data as $row)
{
echo "<option value='{$row['name']}'>";
}
?>
</datalist>
<input type="submit">
</form>
<?php
}
?>