0% found this document useful (0 votes)
27 views

Modul Crud

The document describes the folder structure of a website. It includes files for connecting to a database, displaying module content, and the basic structure of an admin homepage using Bootstrap grids. Config files contain database connection details. The content file determines which modules to include based on the GET parameter. The homepage loads Bootstrap CSS and JavaScript files.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views

Modul Crud

The document describes the folder structure of a website. It includes files for connecting to a database, displaying module content, and the basic structure of an admin homepage using Bootstrap grids. Config files contain database connection details. The content file determines which modules to include based on the GET parameter. The homepage loads Bootstrap CSS and JavaScript files.
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Struktur Folder

Query Tampil
include '../config/koneksi.php';
$sql = "select * from kategori";
$no=1;
$query = mysqli_query($koneksi,$sql);
while($data = mysqli_fetch_array($query)){

config/koneksi.php
<?php
$host
$user
$pass
$db

=
=
=
=

'localhost;
'root;
'';
'nama_database;

$koneksi = mysqli_connect("$host","$user","$pass","$db");
?>

admin/content.php
<?php
if ($_GET['module']=='home'){
echo"<a href='?module=penelitian'></a>";
}
elseif ($_GET['module']=='kategori'){
include "module/mod_kategori/kategori.php";
}
elseif ($_GET['module']=='katfm'){
include "katfm.php";
}
elseif ($_GET['module']=='katedit'){
include "kateditfm.php";
}
else {
echo "<p>MODUL BELUM ADA</p>";
}
?>

admin/home.php
<!DOCTYPE html>
<html>
<head>
<title>Bootstrap 101 Template</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
<script src="https://code.jquery.com/jquery.js"></script>
<script src="js/bootstrap.min.js"></script>
</body>
</html>

Grid
<div class="row">
<div class="col-md-3"> A </div>
<div class="col-md-6"> B </div>
<div class="col-md-3"> C </div>
</div>

You might also like