This seems pretty simple to me - just have a relations table like this:
create table student_test_realtions(
studentID [defs here],
testID [defs here],
KEY (studentID),
KEY (testID)
);
Then they go to test #1 and they answer all of the questions and hit submit you put an entry into this table with the test ID and studenID who took it. Then at the VERY beginning of the main test page you do a check (since the user - I presume - has to be logged in)
"SELECT * FROM student_test_relations WHERE studentID='$studentID' AND testID='$testID'"
Then if mysql_num_rows($result) > 0 don't let them take the test.
--Joe
http://www.miester.org