Hi Master,
please help me, i could not insert my multiple checkbox selected value into my table. please see and help me.
its insert only one value like first one. here is code:
**HTML code: **
<td width="75%">
<input type="checkbox" name="whats_include[]" value="Breakfast" > Breakfast /
<input type="checkbox" name="whats_include[]" value="Lunch" > Lunch /
<input type="checkbox" name="whats_include[]" value="Dinner" > Dinner /
<input type="checkbox" name="whats_include[]" value="Drink" > Drink /
<input type="checkbox" name="whats_include[]" value="Transport" > Transport
</td>
PHP Value Insert Code
if($_POST)
{
$per = $_POST['whats_include'];
foreach($per as $p) {
$inclues= $p.',';
$data['whats_include'] = $inclues;
dumpVar($data);
}
insert(tbl_new_package, $data) //insert query (table, $data)//
}
Output:
Array
(
[user_id] => 1
[trip_name] => bangla tour
[tour_type] => none
[day] =>
[nights] =>
[service_level] => ---None---
[min_person] => 0
[max_person] => 1
[whats_include] => Breakfast,
)
here is details code.please help me .
Regards