Guest User

Untitled

a guest
Feb 24th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. for($i = 1; $i<$arraysize; $i++){ //For every question
  2.  
  3. $questionid = $array[$i]['questionid'];
  4. $points = $array[$i]['points'];
  5. $ID = $ID+1;
  6.  
  7. $queue ="INSERT INTO Exam1 (ID, examname, exam_id) VALUES
  8. ('$questionid','$examname', '$exam_id')";
  9. $result = mysqli_query($connection,$queue);
  10.  
  11.  
  12. $queue1 ="INSERT INTO points (ID, points) VALUES
  13. ( '$ID' , '$points')";
  14. $result1 = mysqli_query($connection,$queue1);
  15.  
  16.  
  17.  
  18. $sql = "UPDATE Question SET points='$points' where ID ='$questionid'";
  19.  
  20. $result1 = mysqli_query($connection,$sql);
  21.  
  22. }
Add Comment
Please, Sign In to add comment