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

$uangka = mysqli_real_escape_string($data, $_REQUEST['updangka']);
$gid = mysqli_real_escape_string($data, $_GET['row']);

$updatestatus = "UPDATE result_lotto SET res_angka = '$uangka' WHERE id = '$gid'";
$bindstats = mysqli_query($data, $updatestatus);

if($bindstats) {
    echo '
    <script>
        alert("Result Successfully Changed!!");
        window.location.href = "../dashboard.php?hal=result";
    </script>
    ';

} else {

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

}

?>