hi i am trying to store multiple selected values in a new table with last inserted id.
my error is array is coming but id_facility value is not coming
here is my form:
<ul id="hostel_facility" class="dropdown-menu dropdown-select">
<?php $facility = $conn->query("SELECT * FROM os_facilities ORDER BY id_facility ASC");
while ($facilityresult = $facility->fetch_assoc()) { ?>
<li><a><input type="checkbox" name="hostel_facility[]" value="<?php echo$facilityresult['id_facility']; ?>" /><?php echo $facilityresult['facility_name']; ?></a></li>
<?php } ?>
</ul>
i want to store in new table columns are id_hostel,id_facility