How to automatically create check box with data coming from a table in the bank?
How to automatically create check box with data coming from a table in the bank?
<?php
$result_categorias = "SELECT * FROM categoria";
$result_categorias = mysqli_query($conn, $result_categorias);
while($row_categorias = mysqli_fetch_assoc($result_categorias)){
?>
<input type="checkbox" name"categoria" value="<?php echo $row_categorias['id']; ?>"><?php echo $row_categorias['nome']; ?></option>
<?php } ?>