Multiple insert codeigniter php

Halo agan semua, jadi disini saya mau minta tolong.

Nah kan di gambar itu ada table yang di samping nya buat jumlah masukan jadi niatnya tuh mau buat pas nanti insert ke table nya tuh row nama sama tapi dengan nilai pic nya beda"

<?php foreach ($data as $key):
   $key = (array)$key;
      if ($key['quantity_di_received'] != ''){
         ?>
<tr>
    <td><?= $key['nama_barang'] == '' ? $key['id_belanja'] : $key['nama_barang'] .' / '. $key['id_belanja']?></td>
    <td><?= $key['kode_modal'] ?></td>
    <td><?= $key['quantity_di_received'] ?></td>
    <td id="pic2"><?= $key['quantity_di_received'] ?></td>
    <td id="containerform<?= $key['id'] ?>">
<?php if ($key['quantity_di_received'] == ""): ?>
  <div class="alert alert-danger">
   <button type="button" class="close" data-dismiss="alert" aria-hidden="true"></button>
      <strong>Quantity Barang Tidak tersedia !</strong></div>
<?php else: ?>
    <div class="form-group" id="formgroup<?= $key['id'] ?>">
       <div class="input-group">
        <input type="number" id="pic" value="" min='0' name="pic[<?= $key['id_belanja']?>]" max="<?= $key['quantity_di_received'] ?>" class="form-control">
         <div class="input-group-btn">
          <button class="btn btn-info plus ml-2" type="button"><i class="fas fa-plus"></i></button>
</div>
</div>
</div>
<?php endif; }?>
</td>
</tr>
<?php endforeach ?>

avatar CrZLyUn
@CrZLyUn

11 Kontribusi 5 Poin

Dipost 4 tahun yang lalu

Belum ada Jawaban. Jadi yang pertama Jawaban

Login untuk ikut Jawaban