Tuesday 25 March 2014

Reflection on 7th week ( Questionnaire & Forum)

As-Salam dan Hye semua..

Wah.. diam tak diam..this is the last week section untuk Prof Zaida masuk kelas kami. Pada minggu terakhir ini Prof telah flashback kan apa yang dah kami pelajari dalam kelas. Dan pada minggu ini juga kami di ajar cara-cara untuk membuat questionnaire dan forum dalam dinamic website kami. Hmmm.. xsusah rupanya nak create function ni..

Malah Prof juga mengingatkan kami agar menyiapkan group projek kami dan perlu dihantar selepas cuti pertengahan semester nanti. 

Questionnaire 

  • Set up the database first. Login>Create table>Save




  • Open Dreamwever>New>.Php
  • Toolbar layout>div tag.Next, insert form.
  • Type questions.For the answer we will use radio group. Click insert>form>radio group



  • Note : 
    • Name type bangsa
    • Label type the options/answer such as melayu,cina ,india and put the value 1,2,3
    • Click on + button if you want to add another option
    • Layout  using tick table
    • Click ok.

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

  • Insert Submit button.
  • Save your file and name it as quiz.html
  • Go to window>server behavior>insert record>after inserting, go to: thank.html

  • Now,we will create thank you page. File>new>html>type your text>save as thank.html
  • Here is the answer that have been key in

  • 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

Forum
  • Create table at phpmysql.Insert 3 rows: id,name and post

  • Open dreamweaver.file>new>php
  • You will used 3 types of server behavior here: insert record, recordset,repeat region
  • First insert form and type name and message. Put text field beside the name and message.Change the properties of the text field according to the name you insert at the database.name as name and message as post.
  • Then, insert submit button and change the button name to post.
  • Save it as forum.php.
  • Window>server behavior>insert record
  • Outside the form line, type comments from others
  • Go to window>Server behaviour>recordset
  • Go to binding panel and drag name and post under the comments from others. Then, highlight it and go to server behavior>repeat region.


No comments:

Post a Comment