Commit 93e2691c by Mei Romauli Sagala

pencarian

parent 65fad6bb
......@@ -46,7 +46,7 @@ $start = ($page - 1) * $per_hal;
<?php
if (isset($_GET['cari'])) {
$cari = mysqli_real_escape_string($GLOBALS["___mysqli_ston"], $_GET['cari']);
$menu = mysqli_query($GLOBALS["___mysqli_ston"], "select * from menu where nama like '$cari' or kategori_id like '$cari'");
$menu = mysqli_query($GLOBALS["___mysqli_ston"], "select * from menu where nama like '$cari*'");
} else {
$menu = mysqli_query($GLOBALS["___mysqli_ston"], "select * from menu limit $start, $per_hal");
}
......
<?php
$cari=$_GET['cari'];
header("location:admin_menu.php?cari=$cari");
?>
\ No newline at end of file
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