0
I cant dislayed chekbox who the data I use from database
its the code $pilihhobi = "<div class=\"form-group\"> <label class=\"col-sm-2 control-label\">Hobi</label> <div class=\"col-sm-6\">"; $no = 1; $sql = "SELECT * FROM tb_hobi"; $q = mysqli_query($conn,$sql); while($data=mysqli_fetch_array($q)){ $pilihhobi .= "<input type=\"c
1 ответ
0
Question isn't complete, but here's a bit of help for the same:
<?php
$sql = "SELECT * FROM table";
$q = mysqli_query($conn, $sql);
?>
<html>
<body>
<div class="form-group">
<?php
while($row = mysqli_fetch_array($q)) {
echo "<label>$row['coloumnName']</label>
<input type='checkbox' name='whatever' value='$row['coloumnName']'><br>";
} ?>