<?php
require '../monitoring/koneksi.php';

$stmt = $conn->prepare("
    INSERT INTO sites (nama_site, code_site, lat, lon, alamat, email, no_tlp)
    VALUES (?, ?, ?, ?, ?, ?, ?)
");

$stmt->bind_param(
    "sidssss",
    $_POST['nama_site'],
    $_POST['code_site'],
    $_POST['lat'],
    $_POST['lon'],
    $_POST['alamat'],
    $_POST['email'],
    $_POST['no_tlp']
);

$stmt->execute();
echo json_encode(["status" => "success"]);
