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

$newlink = mysqli_real_escape_string($data, $_REQUEST['update-img']);
$linktarget = mysqli_real_escape_string($data, $_REQUEST['update-linkimg']);
$idimg = mysqli_real_escape_string($data, $_GET['row']);

$updatestatus = "UPDATE banner_web SET link_bannerweb = '$newlink', link_targetweb = '$linktarget' WHERE id = '$idimg'";
$bindstats = mysqli_query($data, $updatestatus);

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

} else {

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

}

?>