Code: Select all
<?PHP
$Industrybtn = '';
if(!empty($_POST["Industry"]))
{
foreach($_POST["Industry"] as $Industry)
{
$Industrybtn .= $Industry . ', ';
}
}
$stmt = mysqli_prepare($con, "INSERT INTO inf VALUES (?, ?, ?, ?, ?, ?)");
mysqli_stmt_bind_param($stmt, "ssssss", $int, $inf_fname, $inf_lname, $inf_email, $inf_password, $Industrybtn);
mysqli_stmt_execute($stmt);
?>
<div class="checkboxes">
<input type="checkbox" name="Industry[]" id="checkbox_id" style="margin-bottom:15px"><label for="checkbox_id">Dinning</label>
<input type="checkbox" name="Industry[]" id="checkbox_id1" style="margin-bottom:15px"><label for="checkbox_id1">Jewellery</label>
<input type="checkbox" name="Industry[]" id="checkbox_id2" style="margin-bottom:15px"><label for="checkbox_id2">Clothing</label>
</div><br>