0
<label for=""><h5><strong>Dia da Semana</strong></h5></label>
<select name="Dia">
<option value="0">Selecione o Dia</option>
<?php
$servername = "xxx.xxx.xx.xx";
$username = "xxxx";
$password = "xxxxxxx";
$dbname = "xxxxx";
$conn = new mysqli($servername, $username, $password, $dbname);
$conn->set_charset('utf8');
$sql = "SELECT * FROM centrodb.DiasSemana ORDER BY Dias ASC";
$qr = mysqli_query($conn, $sql);
while($ln = mysqli_fetch_assoc($qr)){
echo '<option value="'.$ln['Dias'].'">'.$ln['Dias'].'</option>';
}
?>
</select>
I want this form field to be mandatory
But in this case it’s not a
input
, is<select name="Dia"></select>
and put this and does not require the filling– user104114
select also has the attribute required
– twsouza