diff --git a/sys0-code/app/overview.php b/sys0-code/app/overview.php index 316cd62..5bc9fa9 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"])){ + if(isset($_GET["set_class"]) && $_POST["class"]!==""){ $class_id=htmlspecialchars($_POST["class"]); $sql="update users set class_id=$class_id where username='$username'"; $stmt = mysqli_prepare($link, $sql); @@ -409,7 +409,6 @@ function load_user()