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

$promotxt = mysqli_real_escape_string($data, $_GET['stat']);
$id = mysqli_real_escape_string($data, $_GET['row']);

$updatestatus = "UPDATE panduan_post SET panduan_status = '$promotxt' WHERE id = '$id'";
$bindstats = mysqli_query($data, $updatestatus);

if($bindstats) {
    echo '
    <script>
        alert("Panduan Status Successfully Change!!");
        window.location.href = "../dashboard.php?hal=panduan";
    </script>
    ';

} else {

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

}

?>