<?php
require '../assets/config-data.php';

$info = mysqli_real_escape_string($data, $_REQUEST['jp-text']);
$jmttp = mysqli_real_escape_string($data, $_REQUEST['jmttp']);
$jmundi = mysqli_real_escape_string($data, $_REQUEST['jmundi']);
$linklive = mysqli_real_escape_string($data, $_REQUEST['linklive']);
$idmar = mysqli_real_escape_string($data, $_GET['row']);
$gambar = mysqli_real_escape_string($data, $_REQUEST['gambarlive']);


$updatestatus = "UPDATE pasaran_web SET prediksi_texts = '$info', gambar_pasaran = '$gambar', link_livedraw = '$linklive', jam_tutuppas = '$jmttp', jam_undipass = '$jmundi' WHERE id = '$idmar'";
$bindstats = mysqli_query($data, $updatestatus);

if ($bindstats) {
    echo '
    <script>
        alert("Info Pasaran Successfully Change!!");
        window.location.href = "../dashboard.php?hal=daftarpasaran";
    </script>
    ';
} else {

    echo '
    <script>
        alert("ERROR on Change!!");
        window.location.href = "../dashboard.php?hal=daftarpasaran";
    </script>
    ';
}
