Skip to content

Commit

Permalink
Update Script.php
Browse files Browse the repository at this point in the history
邀请前检查该student_id是否已存在
  • Loading branch information
31iauk committed May 20, 2020
1 parent 099d0e0 commit 454d306
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions Script.php
Original file line number Diff line number Diff line change
Expand Up @@ -1101,8 +1101,13 @@ function checksize($file)



$sql="INSERT INTO `course_group_members_table`( `Course_Group_id`, `Student_ID`, `Status`)
VALUES ($groupid,$student_id,'Invited')";
$result = mysqli_query($con,"SELECT * FROM course_group_members_table where Course_Group_id = '$groupid' and Student_ID = '$student_id'");
if(mysqli_num_rows($result)>0){

This comment has been minimized.

Copy link
@spm2020spring

spm2020spring May 25, 2020

Member

@xiaoyusoil

Thanks. Could you attach a few screenshots or a video to show that the change works?

Hui

header("Location: Course.php?url=".$url);
}else{
$sql="INSERT INTO `course_group_members_table`( `Course_Group_id`, `Student_ID`, `Status`)
VALUES ($groupid,$student_id,'Invited')";
}
if ($con->query($sql) === TRUE) {
$_SESSION["info_ReMarking"]=$student_id . " was invited to the group";
header("Location: Course.php?url=".$url);
Expand Down

0 comments on commit 454d306

Please sign in to comment.