Hi All,

I'm pretty new to the whole php thing and I'm currently making an
multiple choice exam type of thing with php/mssql.

The two tables  concerned are called tbl_exam_questions and
tbl_exam_questions which are defined like so.

[tbl_exam_questions] (
        [question_id] [int] IDENTITY (1, 1) NOT NULL ,
        [question_text] [varchar] (355) NOT NULL ,
        [correct_answer] [int] NOT NULL 

[tbl_exam_answers] (
        [id] [int] IDENTITY (1, 1) NOT NULL ,
        [question_id] [int] NOT NULL ,
        [p_answers] [varchar] (255) NOT NULL 

What I'm trying to do is to pull all the questions out and display them
with the possible answer in a html form and dropbox.
I'm displaying the entire exam on one page, with one submit button on
the bottom so that the student can review the answers before finally
submitting them.

The problem I have is that the form field names are dynamic in that they
are set up the value held in tbl_exam_answers.question_id and with
ms-sql the identity type is not guarenteed to be incremental, so how can
I reference them to send a query back to the DB to mark the student ?

Have I painted myself into a corner ? :-/

Chris MacKenzie

Windows: "Where do you want to go today ?"
 Mac OS: "Where do you want to be tomorrow ?"
  Linux: "Are you coming or what ?"

PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to