Õpilaste lisamine :
 
Klass:
/> $firstname $lastname"); ?>

Kursusele lisati järgmised õpilased:

\n"); $status = $_POST['status']; $status_count = sizeof($status); for($count = 0; $count < $status_count; $count++) { $student_id = $status[$count]; $result = mysql_query("SELECT * FROM Courses_Users WHERE course_id='$course_id' && user_id='$student_id'"); $num = mysql_num_rows($result); if($num==0) { $result1 = mysql_query("INSERT INTO Courses_Users (course_id,user_id) VALUES ('$course_id','$student_id')"); $result2 = mysql_query("SELECT * FROM Users WHERE user_id='$student_id'"); while($row = mysql_fetch_array($result2)) { $firstname = $row["firstname"]; $lastname = $row["lastname"]; } print("$firstname $lastname
\n"); } } print("

\n"); $backlinkurl[1] = "addstudents.php?course_id=".$course_id; $backlinktext[1] = "Õpilaste lisamine"; } ?>