Hi
I want to create a project for doing tests. First I have the name of the test to be put in a textbox by a user, then a description and the quantity of questions for each test. Based on that quantity number I want to create a question with 4 possible answers and write them to a database, then go back to the same page if the number is greater than 1. So if the number is 3, it will loop 3 times asking for the question and answers write the data to the mysql database and go back to the second question and so on until it reaches the end of that quantity number.
Any ideas?
What I have done is had a page where the quiz name and number of questions is put in and when they submit, it will write to the database first, then display one question with the possible answers textboxes, but I can only write one question to the database.
Thanks
Display Textboxes as many times as variable "x"
Moderator: General Moderators
-
WebbieDave
- Forum Contributor
- Posts: 213
- Joined: Sun Jul 15, 2007 7:07 am
Re: Display Textboxes as many times as variable "x"
Yes. Write PHP/SQL code to do as you've describeddatobuka wrote:Any ideas?