<?php
    include "koneksi.php";
    $nama_hadiah = $_POST['nama_hadiah'];
    $background_hadiah = $_POST['background_hadiah'];
    $border_hadiah = $_POST['border_hadiah'];
    $text_hadiah = $_POST['text_hadiah'];
    $persen_hadiah = $_POST['persen_hadiah'];
    $status_hadiah = $_POST['status_hadiah'];
    $proses = mysqli_query($koneksi, "INSERT INTO hadiah(nama_hadiah, background_hadiah, border_hadiah, text_hadiah, persen_hadiah, status_hadiah) VALUES('$nama_hadiah', '$background_hadiah', '$border_hadiah', '$text_hadiah', '$persen_hadiah', '$status_hadiah')");
    if ($proses) {
        header("location: index.php?page=hadiah&notif=berhasil_tambah_data");
    } else {
        echo "Proses Gagal<br>Error : ".$proses."<br>".mysqli_error($koneksi);
    }
?>