I got this error when trying to compile it
Parse error: syntax error, unexpected 'if' (T_IF) in D:\xampp\htdocs\ProyeKoperasi\views\tambah.php on line 4
<?php
include 'Koneksi/koneksi.php';
    if ($_SERVER['REQUEST_METHOD'] == "POST") {//here is line number 4
    $id_koperasi = $_POST['id'];
    $nama_koperasi = $_POST['nama'];
    $alamat = $_POST['alamat'];
    $telp = $_POST['telp'];
    $hp = $_POST['hp'];
    $nama_cp = $_POST['kontak'];
    $email = $_POST['email'];
    $nama_cp = $_POST['kontak'];
    $day1 = strtotime($_POST["tgl"]);
    $day1 = date('Y-m-d H:i:s', $day1);
    $ket_fu = $_POST['Ket'];
    $pilih_ket = "";
    foreach ($ket_fu as $Ket) 
    {
    $pilih_ket .= $Ket . ", ";
    }
    $pilih_ket = substr($pilih_ket, 0, -2);
    $hasil_pembahasan = $_POST['Hasil'];
    $query = "INSERT INTO t_koperasi VALUES (
            '$id_koperasi',
            '$nama_koperasi',
            '$alamat',
            '$telp',
            '$hp',
            '$nama_cp',
            '$day1',
            '$pilih_ket',
            '$hasil_pembahasan')"
    ;
    if (mysqli_query($con,$query)) {
        header("location:index.php");
    }else {
        echo '<script type ="text/javascript">alert("Data gagal ditambahkan");</script>;';
    }
}
include 'views/v_tambah.php';
?>
 
    