Jump to content

Using PHP to create a MySQL data file


Bates Water Gardens

Recommended Posts

I think so.  What I want to do is this:

I am just now learning php.  I wrote a question and answer program in basic when I was in school to quiz me on things I had to learn.  I now teach school and have a teacher page on the school site.  I want to add a page where the students can go in and put in questions to be asked and the answers so the computer can create a data file for each student and they can use it whenever they need to.  I want each student to be able to create their own data file so when they get done, the computer can store the question in a new order, with the most recent that they answered at the end and the next time they start, they will get the ones they haven't seen yet, or the most.

I hope I explained that well enough.  Basically I want each student to go in and be able to add their own data file.

thanks.
Im not really sure what you are trying to get at with a "data file"..... do you mean separate text files, separate tables in mysql.... this can be handled all in a couple tables in mysql

tblstudent_questions
sqid - unique primary key
userid - relates to the student table (their unique identifier in the system)
quesDesc - text for the questions

tblstudent_answers
said - unique identifier to allow multiple answers to the same question
sqid - foreign key relating to the questions table
quesAnswer - their answer to the question
datetime - optional to see when they entered the answer.....

You would have to expand this out to four tables if you wanted predefined questions and answers.....
At this point, the main thing I need to do is have a form that gathers information and take that information with php and create a MySQL data file and store the information in it. 

I'm not really sure if I'm asking it right, I'm just now learning php and MySQL.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.