Tidak bisa menampilkan data dari database

IMG_20201128_184602.jpg

ini kodenya

<form class="form-horizontal" action="<?php echo $config['web']['url']; ?>pemesanan/pulsa" method="POST">
  <input type="hidden" name="csrf_token" value="<?php echo $config['csrf_token'] ?>">
  <div class="form-group">
    <label class="col-md-12 control-label">Operator
    </label>
    <div class="col-md-12">
      <select class="form-control" name="operator" id="operator">
        <option value="0">Pilih Salah Satu
        </option>
        <?php
$cek_kategori = $conn->query("SELECT * FROM kategori_layanan WHERE tipe IN ('pulsa-reguler') ORDER BY nama ASC");
while ($data_kategori = $cek_kategori->fetch_assoc()) {
?>
        <option value="<?php echo $data_kategori['kode']; ?>">
          <?php echo $data_kategori['nama']; ?>
        </option>
        <?php } ?>
      </select>
    </div>
  </div>
  <div class="form-group">
    <label class="col-md-2 control-label">Service
    </label>
    <div class="col-md-10">
      <select class="form-control" name="layanan" id="layanan">
        <option value="0">- Select One -
        </option>
      </select>
      <font color="red" id="note">
      </font>
    </div>
  </div>
  <div class="form-group">
    <label class="col-md-2 control-label">Nomor Telepon
    </label>
    <div class="col-md-10">
      <input type="number" name="target" id="target" class="form-control">
    </div>
  </div>
  <div class="form-group">
    <label class="col-md-2 control-label">Price
    </label>
    <div class="col-md-12">
      <div class="input-group">
        <div class="input-group-prepend">
          <div class="input-group-text">Rp.
          </div>
        </div>
        <input type="number" class="form-control" id="harga" readonly>
      </div>
    </div>
  </div>
  <div class="form-group">
    <div class="col-md-12">
      <button type="submit" class="pull-right btn btn-block btn--md btn-primary waves-effect waves-light" name="pesan">
        <i class="mdi mdi-cart">
        </i>Beli Sekarang
      </button>
    </div>
  </div>
</form>

avatar nfa
@nfa

8 Kontribusi 3 Poin

Diperbarui 3 tahun yang lalu

1 Jawaban:

<div>Sudah dihubungkan dengan databasenya?</div><pre>$conn = mysqli_connect("localhost", "root", "", "namaDatabase");</pre>

avatar novelbetter
@novelbetter

2 Kontribusi 0 Poin

Dipost 3 tahun yang lalu

Tanggapan

kalau itu sudah gan

Login untuk ikut Jawaban