Creating Database Web Applications with PHP and ASP (Charles River Media Internet & Web Design)
-
Enhance the inputquestions scripts by validating the input. Specifically, check that the value is a number. Do research and implement a way to validate the answer pattern for a question as being a valid regular expression. It would also be appropriate to add functions (addslashes and stripslashes for PHP, and escape and unescape for ASP/JavaScript) to handle special characters.
-
Modify the system by adding a categories table. A possible design is for the fields to be category_id, category_name, and category_description. Questions must refer to one of the given categories.
-
Design and add a script or scripts to edit one or more of the fields in the questions table. You can then remove the listing of all the questions from the inputquestions scripts.
-
Enhance the showscores scripts to show when each player last played the game. This field is not used in the present implementation.
-
The questions in the database each have a field for points. This field could be any number. Modify this field to be a level, say from 1 to 5, indicating easiest, easy, moderate, difficult, most difficult, or the words indicating level. You can investigate MySQL and Access for support of a datatype called enumerated types. Modify the inputquestions scripts to offer a radio box instead of a field for the level. Then, modify choosecategory to accept a level indication.
-
A name submitted by a person generally is not considered distinctive enough. Develop a system in which the player name is checked against existing names, and the player asked to confirm if he or she was the player who last played on a given date and had a given score. Alternatively, design and develop an ID and password system.
Категории