Tuesday, April 1, 2014

Develop Questionnaire and forum using php

For this week class we learnt how to create questionnaire and forum using php.

First, lets start with questionnaire.

1.You need to set up the database first.
 Login>create table>save

2. Open dreamwever>new>php
3.Toolbar layout>div tag.Next, insert form.
4.Type questions.For the answer we will use radio group. Click insert>form>radio group

-name type bangsa
-Label type the options/answer such as melayu,cina ,india and put the value 1,2,3
-click + if you want to add another option
-layout  using tick table
-click ok, and you will get this view

Besides, you also can tick *checked to the answer.This prevent user to leave unchecked for the question.

5. Insert Submit button.
6.Save your file and name it as quiz.html
7.Go to window>server behavior>insert record>after inserting, go to:thankyou.html ( will create later)


8.Now,we will create thank you page. File>new>html>type your text>save as thankyou.html


9.Here is the answer that have been key in
10.Other than that, we also can do analysis based on the answer. Such as, how many students agree for the question 1 b?

11.File>new>php>insert table>type text>


 put cursor at the table>server behavior>recordset>change name>connection;dmx>table choose quiz>columns tick all>filter: umur, = and entered value ,2 ( this refer on the value you insert at radio group)>ok


server behavior>display record count>display total record>choose recordset according to the name you have entered before>ok


arrange nicely by table

here is the preview

12.You also can find how many males with age 13-15 by using options advanced in recordset.This video might be help.



Forum tutorial will be in next entry.



No comments:

Post a Comment