edit

parent 59ead1f0
...@@ -2,6 +2,8 @@ ...@@ -2,6 +2,8 @@
session_start(); session_start();
include_once 'functions/fungsi.php'; include_once 'functions/fungsi.php';
include_once 'connection/koneksi.php'; include_once 'connection/koneksi.php';
?> ?>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
...@@ -91,8 +93,8 @@ include_once 'connection/koneksi.php'; ...@@ -91,8 +93,8 @@ include_once 'connection/koneksi.php';
<?php <?php
$per_hal = 8; $per_hal = 8;
$jumlah_record = mysqli_query("SELECT * from menu"); $jumlah_record = mysqli_query($conn, "SELECT * from menu");
$jum = mysqli_num_rows($conn,$jumlah_record); $jum = mysqli_num_rows($jumlah_record);
$halaman = ceil($jum / $per_hal); $halaman = ceil($jum / $per_hal);
$page = (isset($_GET['page'])) ? (int) $_GET['page'] : 1; $page = (isset($_GET['page'])) ? (int) $_GET['page'] : 1;
$start = ($page - 1) * $per_hal; $start = ($page - 1) * $per_hal;
...@@ -112,8 +114,8 @@ $start = ($page - 1) * $per_hal; ...@@ -112,8 +114,8 @@ $start = ($page - 1) * $per_hal;
<div class="col-lg-12"> <div class="col-lg-12">
<?php <?php
$query = mysqli_query($conn,"SELECT * FROM menu limit $start, $per_hal"); $query = "SELECT * FROM menu limit $start, $per_hal";
$result_set = $database->query($query); $result_set = $conn->query($query);
while ($row = $result_set->fetch_assoc()) { while ($row = $result_set->fetch_assoc()) {
?> ?>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment