';
}
else
{
$_SESSION['errorMsg'] = "error: " . $sql . "
" . mysqli_error($conn);
}
header("location:home.php?pages=productList");
}
if(isset($_GET['status']))
{
$id = $_GET['status'];
$val = $_GET['val'];
$sql = mysqli_query($cn,"update `tbl_product` SET `status`='".$val."' where id='".$id."'");
$_SESSION['errorMsg'] = 'Success! Product Status Updated Successfully.
';
header("location:home.php?pages=productList");
}
if(isset($_SESSION['errorMsg'])){ echo $_SESSION['errorMsg'];}
?>