Pen - FSodic.com

Insert Data to Database using JQuery, Bootstrap and Ajax

daftar_produk.php

Jum, 18 Jan 2019 16:20 Fajar Sodik
  • Syntax
  • Textarea
123456789101112131415161718192021222324252627282930
<?php
include ('./database.php');

$produk_scan $connect->query("SELECT * FROM `produk` ORDER BY `nama_produk` ASC");
if(
$produk_scan->num_rows == 0)
{
echo 
'
<div class="alert alert-info" role="alert">Produk kosong</div>
'
;
}
else
{
echo 
'
<ul class="list-group">
'
;
while(
$produk $produk_scan->fetch_object())
{
echo 
'
<li class="list-group-item">

<span class="badge">'
.$produk->stok_produk.'</span>

'
.htmlentities($produk->nama_produk).'
</li>
'
;
}
echo 
'
</ul>
'
;
}

Pen File

Back to Top

Please use Google Chrome browser for get our best service

Google Chrome