Bates Water Gardens Posted January 24, 2007 Share Posted January 24, 2007 How do I create a new MySQL data file using PHP code? What would be the code? Quote Link to comment https://forums.phpfreaks.com/topic/35546-using-php-to-create-a-mysql-data-file/ Share on other sites More sharing options...
Bates Water Gardens Posted January 25, 2007 Author Share Posted January 25, 2007 Anyone? Quote Link to comment https://forums.phpfreaks.com/topic/35546-using-php-to-create-a-mysql-data-file/#findComment-168995 Share on other sites More sharing options...
dgiberson Posted January 25, 2007 Share Posted January 25, 2007 you mean like creating a mysql table or mysql schema from php? Quote Link to comment https://forums.phpfreaks.com/topic/35546-using-php-to-create-a-mysql-data-file/#findComment-169011 Share on other sites More sharing options...
Bates Water Gardens Posted January 25, 2007 Author Share Posted January 25, 2007 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. Quote Link to comment https://forums.phpfreaks.com/topic/35546-using-php-to-create-a-mysql-data-file/#findComment-169023 Share on other sites More sharing options...
dgiberson Posted January 25, 2007 Share Posted January 25, 2007 will the students somehow be logging into this question / answer tool? Quote Link to comment https://forums.phpfreaks.com/topic/35546-using-php-to-create-a-mysql-data-file/#findComment-169026 Share on other sites More sharing options...
Bates Water Gardens Posted January 25, 2007 Author Share Posted January 25, 2007 If I understand what you are asking, yes. Quote Link to comment https://forums.phpfreaks.com/topic/35546-using-php-to-create-a-mysql-data-file/#findComment-169033 Share on other sites More sharing options...
Bates Water Gardens Posted January 25, 2007 Author Share Posted January 25, 2007 They will basically create a data file of questions and answers using their name. I guess each data file will be saved as the student's name. I haven't decided exactly how I'm going to do that. Quote Link to comment https://forums.phpfreaks.com/topic/35546-using-php-to-create-a-mysql-data-file/#findComment-169035 Share on other sites More sharing options...
TEENFRONT Posted January 25, 2007 Share Posted January 25, 2007 Biiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiig job.Well not huge, but, your best off looking for a tutorial on user login scripts etc, once thats sorted and youve played with it abit, your probly gunna know how to finish it off with user questions and answers. Quote Link to comment https://forums.phpfreaks.com/topic/35546-using-php-to-create-a-mysql-data-file/#findComment-169038 Share on other sites More sharing options...
dgiberson Posted January 25, 2007 Share Posted January 25, 2007 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 mysqltblstudent_questionssqid - unique primary keyuserid - relates to the student table (their unique identifier in the system)quesDesc - text for the questionstblstudent_answerssaid - unique identifier to allow multiple answers to the same questionsqid - foreign key relating to the questions tablequesAnswer - their answer to the questiondatetime - 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..... Quote Link to comment https://forums.phpfreaks.com/topic/35546-using-php-to-create-a-mysql-data-file/#findComment-169066 Share on other sites More sharing options...
Bates Water Gardens Posted January 25, 2007 Author Share Posted January 25, 2007 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. Quote Link to comment https://forums.phpfreaks.com/topic/35546-using-php-to-create-a-mysql-data-file/#findComment-169271 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.