In the Exam1 table, ID, examname, and exam_id values are added fine. But when I try to use the UPDATE query to update the points to another table (Question), it does not work.
        for($i = 1; $i<$arraysize; $i++){ //For every question
            $questionid = $array[$i]['questionid'];
            $points     = $array[$i]['points'];
            $ID = $ID+1;
            $queue ="INSERT INTO Exam1 (ID, examname, exam_id) VALUES
            ('$questionid','$examname', '$exam_id')";
            $result = mysqli_query($connection,$queue);
            $queue1 ="INSERT INTO points (ID, points) VALUES
            ( '$ID' , '$points')";
            $result1 = mysqli_query($connection,$queue1);
         $sql = "UPDATE Question SET points='$points' where ID ='$questionid'";
           $result1 = mysqli_query($connection,$sql);
        }

 
    