 <!-- Small modal -->
 <div class="modal" id="addNewDiv" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
      <div class="modal-dialog modal-sm" style="margin-top: 10%;">
         <div class="modal-content">
          <div class="modal-header header">
            <h5 class="modal-title" id="exampleModalLabel"><b>New BOQ Division.</b></h5>
            <button type="button" class="close" data-dismiss="modal" aria-label="Close">
              <span aria-hidden="true">&times;</span>
            </button>
          </div>
          
        <div class="modal-body">
            <form id="form_validation" method="POST" action="" autocomplete="off">
                <input type="hidden" name="req_div" value="<?php echo $req;?>" required style="width: 90%;">
                <input type="hidden" name="conbdiv" value="<?php echo $conreq;?>" required style="width: 90%;">
                <input type="hidden" name="appointdiv" value="<?php echo $appoint;?>" required style="width: 90%;">
                <input type="hidden" name="dept_div" value="<?php echo $role_id;?>" required style="width: 90%;">
                <input type="hidden" name="usrec_div" value="<?php echo $userid;?>" required style="width: 90%;">
                
                <div class="form-group">
                    <label class="form-label" for="boqtitle"><b> BOQ Title<span class="required" style="color:red">*</span></b></label>
                    <select class="form-control w-100" name="boqtitle_id" id="boqtitle_id" data-placeholder="-select title-" required>
                        <option></option>
                        <?php
                            $sth1 = $db->query('SELECT * FROM tbl_boq_title WHERE req_tle="'.$req.'" AND sts_btle=8 ORDER BY btle_id DESC');
                            try
                            {
                                while ($rr1 = $sth1->fetch(PDO::FETCH_ASSOC)) {
                                ?>
                                    <option value="<?php echo $rr1['btle_id']; ?>"><?php echo $rr1['boqtitle_name']; ?></option>
                                <?php
                                }
                                }
                                catch (PDOException $ex) {
                                //Something went wrong rollback!
                                echo $ex->getMessage();
                            }
                        ?>	
                    </select>
                </div>

                <div class="form-group">
                    <label class="form-label" for="boqtitle"><b> BOQ Component<span class="required" style="color:red">*</span></b></label>
                    <select class="form-control w-100" name="compnt_id" id="compnt_id" data-placeholder="-select component-" required>
                    <option></option>
                        <?php
                            $sth1 = $db->query('SELECT * FROM tbl_boq_compnt WHERE req_cpnt="'.$req.'" AND sts_bcpnt=8 ORDER BY bcpnt_id DESC');
                            try
                            {
                                while ($rr1 = $sth1->fetch(PDO::FETCH_ASSOC)) {
                                ?>
                                    <option value="<?php echo $rr1['bcpnt_id']; ?>"><?php echo $rr1['boqcpnt_name']; ?></option>
                                <?php
                                }
                                }
                                catch (PDOException $ex) {
                                //Something went wrong rollback!
                                echo $ex->getMessage();
                            }
                        ?>	
                    </select>
                </div>

                <div class="form-group">
                    <label class="form-label" for="boqdiv"><b> BOQ Division<span class="required" style="color:red">*</span></b></label>
                    <textarea type="text" name="boqdiv" rows="2" class="form-control" placeholder="Write here..." required></textarea>
                </div>
            
            <div class="modal-footer">
              <button type="button" class="btn btn-default" data-dismiss="modal" style="border-radius: 5px;">Close</button>
              <button type="submit" name="btnBoqDIV" class="btn btn-primary" style="border-radius: 5px;">Save</button>
            </div>
      
        </form>
     </div>
  </div>
</div>
</div>