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