- an on-line questionnaire
- a forum page
--------------------------------------------
On-line Questionnaire
For on-line questionnaire, we need to create :
- MySQL database : questionnaire
- questionnaire.php (as a form of questions)
- analysis.php (to view the analysis of result answered)
MySQL database : questionnaire
- Using existing database : dataphp
- Create a new table : questionnaire as shown above
- Setup id as auto increment and primary key
questionnaire.php
- Type the instruction of questionnaire
- Insert form
- Type the questions in the form
- Insert Form > Radio Group (for option question)
- Fill up the radio group setting as below :
- Insert Form > textfield (for filling up question type)
- The questionnaire will be like this:
- For Likert Scale questionnaire, we are suggested inserting a table to make it proper separately.
- Insert radio group for each questions.
- Insert > Form > Radio Group
- Fill up the Radio Group Setting
- Then, drag the radio button into the table
- After that, continue for the question 5 (b5) and 6 (b6) with the same steps.
- For 'choose than one' question type.
- We have to insert checkbox group
- Insert > Form > Checkbox Group
- Fill up the checkbox group setting
- Drag each checkbox button into the table
- Lastly, insert submit button
- As usual, we have to add server behaviours :
analysis.php
- Using table to make a proper full analysis.
- Type the items as below
- Each of analysis needs a Recordset
- For display Total number of members :
- Add Recordset
- Put the cursor into the cell where we want the total number is displayed
- Add Display Record Count > Display Total Records
- Use the same steps for another analysis.
- For analysis 'Total number of members check the box more than 5 boxes' we need advanced SQL setting as below:
- The analysis.php displays as shown as below :
Forum Page
For forum page, we need to create :
- MySQL database : forum
- forum.php (main page of forum)
MySQL database : forum
- Using existing database : dataphp
- Create a new table : forum as shown above
- Setup id as auto increment and primary key
forum.php
- Insert form
- Insert table for the proper display
- Insert form > textfield and text area as shown as below :
- Insert button 'Send Comment'
- Add server behaviours : Insert Record , and fill up the insert record setting as shown as below , after inserting, users are linked to the forum.php back.
- To display the comments from others, we need to insert another table outside of the form.
- Add Server behaviors : Recordset
- Drag Recordset1:name and Recordset1:post into the table.
Reflection :
Hopefully from the tutorial above, we could develop another page of dynamic website as robust as we could.
No comments:
Post a Comment