各方好友,
集合各方精英人士的技術意見, 我希望在自己 架一個新 "問卷論壇" , 這問卷論壇是以大批量
的問卷方法在論壇內發表問卷查問 ." 會用checkbox 題問 "
查問格式如下 :
1. 妳喜歡上班坐什麼車呢 ? ( 問卷主題, 可以自己修改 )
a . 的士 [ ] b 巴士 . [ ] c . 電車 . d. 走路 . [ ] e. 沒有意見 . [ ]l <--- 可以自己修改
2. 妳喜歡中午飯時間食什麼呢 ?
a . 中餐 [ ] b 粵菜 . [ ] c . 外賣 d. 自己做 . [ ] e. 沒有意見 . [ ]
以上2 條的例子, 我想用一個軟件可以或mod 自動顯示出來, 請問各方高手可以幫下我嗎 , 有什麼好
mod 或軟件放在 discuz 內用, 可以達到這效果 ?
希望出來 - 近似效果 : http://www.plus2net.com/php_tutorial/poll_display.php
新手 - 程式員
========================================================
英文原版意思
Do anyone has template of questionaire, i need help for create a questionaire and then after create questionaire, user can do the questionaire and the submit their answer to database. From database(MySQL), i need to calculate the result to come out a graph
Example of questionaire:
Inventory Career
1=strongly agree, 2=agree, 3= no comment, 4 =disagree, 5=strongly disagree
1 2 3 4 5
1) You must..................... (there has 5 radio button which different value)
2) You ...............
3) You......................
Submit
Back to top
View user's profile Send private message MSN Messenger
smo
Solution
==================================================
You have to create two tables for this, in the first table store the questions and in second table store the answers. In your first table store the questions like this . I am giving the field names only, hope you can understand from this
Question_table
q_id ( unique id for each question, create auto increment field )
q_name: Name of the questions
Answer_table
Q_id (question id of first table)
Ans_no ( Answer can be from 1 to 5 based on selection )
While displaying you can link both the tables and use group by command to display scores against each question.
You can use gd library for graph or without that also you can use one simple 10x10 box image and while displaying the height can be the variable ( based on the poll result ) that will give you bar graph. Example
<img src=bar.gif width=10 height=’$row->number’>
Here is one tutorial on poll using one question , you can expand this tutorial to generate your survey questions.
http://www.plus2net.com/php_tutorial/php_poll.php
================================================= |