Initial commit: Setup Landing Page dan file pertemuan

This commit is contained in:
Romeo3
2026-06-09 13:50:00 +07:00
commit c94bc418ef
35 changed files with 8807 additions and 0 deletions
+32
View File
@@ -0,0 +1,32 @@
<?php
session_start();
// Tolak akses jika bukan admin
if (!isset($_SESSION['role']) || $_SESSION['role'] !== 'admin') {
http_response_code(403); // Status Forbidden
echo "Akses ditolak! Anda bukan operator.";
exit;
}
include 'koneksi.php';
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
$nama = $_POST['nama_pemilik'];
$status = $_POST['status'];
$luas = $_POST['luas'];
$koordinat = $_POST['koordinat'];
// Perhatikan: id dihilangkan, tanda tanya hanya 4
$stmt = $conn->prepare("INSERT INTO parsil (nama_pemilik, status, luas, koordinat) VALUES (?, ?, ?, ?)");
// Perhatikan: huruf ssds (4 huruf untuk 4 variabel)
$stmt->bind_param("ssds", $nama, $status, $luas, $koordinat);
if ($stmt->execute()) {
echo "Data Parsil berhasil disimpan!";
} else {
echo "Gagal: " . $conn->error;
}
$stmt->close();
$conn->close();
}