diff --git a/sys0-code/app/overview.php b/sys0-code/app/overview.php index 5bc9fa9..6ac40b9 100644 --- a/sys0-code/app/overview.php +++ b/sys0-code/app/overview.php @@ -69,7 +69,7 @@ function load_user() $_SESSION["rid"]=0; $_SESSION["rid"]++; - if(isset($_GET["set_class"]) && $_POST["class"]!==""){ + if(isset($_GET["set_class"]) && isset($_POST["class"])){ $class_id=htmlspecialchars($_POST["class"]); $sql="update users set class_id=$class_id where username='$username'"; $stmt = mysqli_prepare($link, $sql);