<?php
include "config/koneksi.php";

$nama  = mysqli_real_escape_string($conn, $_POST['nama']);
$email = mysqli_real_escape_string($conn, $_POST['email']);
$no_hp = mysqli_real_escape_string($conn, $_POST['no_hp']);

// Simpan ke database
mysqli_query($conn, "INSERT INTO pendaftaran 
(nama,email,no_hp) 
VALUES ('$nama','$email','$no_hp')");
?>

<!DOCTYPE html>
<html>
<head>
    <title>Sukses</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>

<div class="container mt-5 text-center">
    <div class="alert alert-success">
        <h4>Pendaftaran Berhasil!</h4>
        <p>Data Anda sudah tersimpan. Silakan tunggu informasi selanjutnya dari admin.</p>
    </div>

    <a href="index.php" class="btn btn-primary">Kembali ke Beranda</a>
</div>

</body>
</html>