prepare("UPDATE scategory set action='1' where id='$id'"); $sql1->execute(); header("Location:../listscategory.php"); } if ($_GET["scategory"]==1){ $id=$_GET["id"]; $sql1 = $db->prepare("UPDATE scategory set action='0' where id='$id'"); $sql1->execute(); header("Location:../listscategory.php"); } ?>