hey, i am trying to insert multiple checkbox data in my database but having a littlt bit problem. When i am trying to insert checkbox data it inserts only id and nothing else.
Here is my full code:-



  $contact_sms = $_POST['contact_sms'];  
  $check[] = $_POST['check'];
  $firm_name = $_POST['firm_name'];
  $checkbox = $_POST['check'];

    $bulksms="INSERT INTO bulk_sms (sent_sms,firmname_sms,contact_sms) VALUES('".$checkbox[$i]. "','".$row['firm_name']. "','$contact_sms')";
    $smsquery=mysqli_query($conn, $bulksms);

$sql="SELECT * FROM inventory_details where status ='0' AND role='0' ORDER BY position ASC, role ASC, visiter DESC limit 0,100";  
$query=mysqli_query($conn, $sql);


    <form method="post" action="" id="msform">   
        $id = $row['id'];
        $firm_name = $row['firm_name'];

        <div class="col-md-4">
          <input type="text" class="form-control" name="id_sms" value="<?php echo $id;?>">
        <div class="col-md-6">
          <input type="text" class="form-control" name="firm_name[]" value="<?php echo $firm_name;?>">
        <div class="col-md-2">
          <input type="checkbox" id="checkItem" name="check[]" value="<?php echo "$id"; ?>">


      <input type="text" class="form-control" name="contact_sms" placeholder="Contact Number.."> 
      <button type="submit" class="btn btn-success" name="save">Send</button>


when i click on Send button , it only stores `id`inside the field `sent_sms` and nothing in field `firm_name`. Please help me out. I am poorly trapped in it.
Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.18 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.