调查问卷php源码(html问卷调查源码)
华为云服务器特价优惠火热进行中! 2核2G2兆仅需 38 元;4核4G3兆仅需 79 元。购买时间越长越优惠!更多配置及优惠价格请咨询客服。
合作流程: |
本篇文章给大家谈谈调查问卷php源码,以及html问卷调查源码对应的知识点,希望对各位有所帮助,不要忘了收藏本站喔。
微信号:cloud7591如需了解更多,欢迎添加客服微信咨询。
复制微信号
本文目录一览:
- 1、php 我想做一个问卷调查的页面,每个问题都有各自的选项,
- 2、求一个问卷调查的网页模板
- 3、谁有PHP语言的问卷调查系统的源码?多简易都可以,着急
- 4、php 问卷调查结果统计
- 5、求高手给个的网页问卷调查asp 原代码
- 6、怎么用PHP做问卷调查
php 我想做一个问卷调查的页面,每个问题都有各自的选项,
php问卷调查系统。以下为你提供一些思路:
首先,你需要先分析你的这个系统都有哪一些问题类型? 单选、多选、问答?
数据库表设计,可以如下参考:id , type , title , a , b , c , d , posttime
id为自增排序,type为问题类型,可以采用数字进行存储,如:1作为单选,2作为多选....
a,b,c,d各为选项,posttime为发布的时间。
需要注意的是,当问题为问答题时,存储的数据保存到a选项即可。
求一个问卷调查的网页模板
%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%
!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" ""
html
head
meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"
titleInsert title here/title
/head
body
br/br/hr/
h1 align="center"font color="#FF0000"问卷调查/font/h1
form action=""
table width="60%" border="1" align="center" bgcolor="#CCCCCC" cellspacing="0"
tr
td姓名:/td
tdinput type="text" /font color="#FF0000"nbsp;必须填写/font/td
/tr
tr
td性别:/td
tdinput type="radio" name=""/男input type="radio" name=""/女/td
/tr
tr
td年龄:/td
tdinput type="text" /岁/td
/tr
tr
td性格:/td
td
input type="checkbox" name="select1"/乐天达观
input type="checkbox" name="select2"/成熟稳重
input type="checkbox" name="select3"/多愁善感
input type="checkbox" name="select4"/心地善良
input type="checkbox" name="select5"/实事求是
input type="checkbox" name="select6"/活泼可爱
input type="checkbox" name="select7"/聪明伶俐
/td
/tr
tr
td学历:/td
td
select name=""
option value="" selected="selected"小学/option
option value=""初中/option
option value=""高中/option
option value=""大学/option
option value=""研究生/option
option value=""硕士研究生/option
option value=""博士/option
/select
/td
/tr
tr
td兴趣爱好:/td
td
select name=""
option value="" selected="selected"体育/option
option value=""看书/option
option value=""玩游戏/option
option value=""逛街/option
option value=""健身/option
option value=""游泳/option
option value=""打球/option
/select
/td
/tr
tr
td有什么意见或建议:/td
tdtextarea cols="80" rows="10"/textarea/td
/tr
tr
td colspan="2" align="center"input type="submit" value="提 交"/nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;input type="reset" value="重 置"//td
/tr
/table
/form
/body
/html
谁有PHP语言的问卷调查系统的源码?多简易都可以,着急
你可以到开源中国网站上搜索相关的源码。
以下是附件是一个称为 PhpQuestionnaire 的问卷调查系统,输入install.php进行安装。这个开源代码是外国人编写的,此版本经过汉化,中文语言包的位置在languages/chinese/index.php。供参考。
php 问卷调查结果统计
背景:
由于具体工作的原因,我做了一份纸质的问卷调查表,调查表的主要内容是让用户对项要求(编号为A,B....)进行优先级排序,所以我得到的结果是好几百份类似于AIHGD....等结果。
目标:
根据用户的排序结果对这项要求进行量化考评,最终的结果希望是A:,B:,C:.....,以找出哪一个要素相对重要,而另一些相对不重要。
做法:
根据编号的排位名次,赋与不一样的权重,统计所有的结果,将这些权重汇总。例如:“ABCDEFGHIJ”这个结果表示A这一项得到分,J这项得到了分,D这项得到了分。
知识点:
文件读取;循环;关联数组;数组排序。
php代码:
$rs
=array("A"=,"B"=,"C"=,"D"=,"E"=,"F"=,"G"=,"H"=,"I"=,"J"=);
$handle
=
fopen('./file.txt',
'r');
while(!feof($handle))
{
$string
=
fgets($handle,
);
for($i=;$istrlen($string);$i++)
{
$t
=
strtoupper($string[$i]);
if(isset($rs[$t]))
$rs[$t]
=
$rs[$t]+
strlen($string)
-
$i;
}
}
fclose($handle);
arsort($rs);
var_dump($rs);
说明:file.txt是一个文本文件,其中的每一行表示一份问卷的结果,类似于“ABCDEFGHIJ”这样的东西。这个文件是如何得到了呢?好吧,我承认不是我自己手动录入的,我找了些人帮忙(为什么不做网上问卷呢?省得这么麻烦)
以上内容就是本文给大家介绍的php
问卷调查结果统计,希望对大家有所帮助。

求高手给个的网页问卷调查asp 原代码
后台主程序admin_wjdc.asp~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!--#include file="Ft_admin_conn.asp"--
!--#include file="../inc/Ft_format.asp"--
!--#include file="Ft_admin_top.asp"--
%
'AdminLogin()
'call AdminPower(8,0)
'dim page,vtname,startdate,expiredate,vt_id,itemname,itemcount,item_id,currentvotename
'dim rs2,currentpage,totalvote,totalpages,i,vt_color,vt_title,titlecolor,currentvote
'if request.querystring("page")"" then
'page=CheckSql("投票分页",request.querystring("page"),0,8)
'end if
%
table cellspacing="1" cellpadding="4" class="tableborder" align="center"
tr class="tablebody" align="center"
td class="td_title" width="50%" a href="admin_wjdc.asp?action=addtopic"font color="#ffffff"新增问卷主题/font/a/td
td class="td_title" width="50%" a href="admin_wjdc.asp?action=list"font color="#ffffff"问卷管理/font/a/td
/tr
/table
br
%
'==================================
'=功 能:主调代码,相应功能皆有说明
'==================================
Select case request.QueryString("action")
case "list" '问卷主题列表
call addtopiclist()
case "addtopic" '添加问卷主题
call addtopic()
case "edittopic" '编辑问卷主题
call edittopic()
case "mxtopic" '查看问卷明细
call mxtopic()
case "additem" '添加问卷主题的调查项目
call additem()
case "edititem" '编辑问卷选项主题
call edititem()
case "additemson" '添加项目的选项
call additemson()
Case "edititemson" '编辑项目的选项
Call edititemson()
Case "deltopic" '删除主题
Call deltopic()
Case "delitem" '删除主题项目
Call delitem()
Case "delitemson" '删除主题项目选项
Call delitemson()
Case "nr" '删除主题项目选项
Call nr()
Case "fb" '发布主题
Call fb()
case else
call addtopiclist()
End Select
'==================================
'=过 程 名:addtopic()
'=功 能:新添问卷主题
'==================================
Sub addtopic()
dim wj_topic,currentvote
If request("addtopic")="true" then
wj_topic=CheckSql("问卷主题",request.form("wj_topic"),1,50)
sql="select * from Ft_wjdctopic"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,3
rs.addnew
rs("wj_topic")=wj_topic
rs("wj_date")=Now()
rs("anyone")=request("anyone")
rs.update
rs.close:set rs=nothing
response.redirect "?action=list"
end if
%
table cellspacing="1" cellpadding="4" class="tableborder" align="center"
form name="form1" method="post" action=""
tr class="tablebody"
td colspan="2" class="td_title"新增问卷主题/td
/tr
tr class="tablebody"
td colspan="2" height="30"strongT I P S:/strong在新添了问卷主题后,应点击相应主题“编辑”功能或“新添选项”,添加问卷选项。/td
/tr
tr class="tablebody"
td width="13%" align="center"主题名称/td
td width="87%"input type="text" name="wj_topic" size="30" maxlength="50"
INPUT TYPE="radio" NAME="anyone" value="1"关闭匿名问卷
/td
/tr
tr class="tablebody" align="center"
td height="30" colspan="2"
input type="submit" name="submit" value="确定新增" class="submit"
input type="reset" name="reset" value="清空重填" class="submit"
input type="hidden" name="addtopic" value="true"
/td
/tr
/form
/table
%End Sub
'==================================
'=过 程 名:addtopiclist()
'=功 能:问卷主题列表
'==================================
sub addtopiclist()
sql="select * from Ft_wjdctopic"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,3
%
table cellspacing="1" cellpadding="4" class="tableborder" align="center"
tr class="tablebody"
td colspan="3" class="td_title"问卷列表/td
/tr
tr class="tablebody"
td width="13%" align="center"id/td
td width="60%" align="center"主题/td
td width="27%" align="center"/td
/tr
%do while not rs.eof and not rs.bof%
tr class="tablebody" align="center"
td width="13%" align="center"%=rs("topic_id")%%If rs("stat")=1 then%font size="2" color="red"(已发布)font%End if%/td
td width="60%" align="center"%=rs("wj_topic")%/td
td width="27%" align="center"
a href="?topic_id=%=rs("topic_id")%action=mxtopic"class="submit"查看明细 /a
a href="?topic_id=%=rs("topic_id")%action=edittopic"class="submit"编辑 /a a href="?topic_id=%=rs("topic_id")%action=deltopic" class="submit"删除 /a
a href="?topic_id=%=rs("topic_id")%action=fb" class="submit" 发布 /a/td
/tr
%rs.movenext
loop
rs.close:set rs=nothing
%
/table
%
end sub
'==================================
'=过 程 名:edittopic()
'=功 能:编辑问卷主题
'==================================
sub edittopic()
if request.form("editaddtopic")="true" Then
sql="select * from Ft_wjdctopic where topic_id="request("topic_id")
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,3
rs("wj_topic")=request("wj_topic")
rs.update
rs.close:set rs=nothing
response.redirect "?action=list"
end if
sql="select * from Ft_wjdctopic where topic_id="request("topic_id")
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,3
if not rs.eof and not rs.bof then
%
table cellspacing="1" cellpadding="4" class="tableborder" align="center"
form name="form1" method="post" action=""
tr class="tablebody"
td colspan="2" class="td_title"编辑问卷主题/td
/tr
tr class="tablebody"
td colspan="2" height="30"strongT I P S:/strong 在新添了问卷主题后,应点击相应主题“编辑”功能或“新添选项”,添加问卷选项。/td
/tr
tr class="tablebody"
td width="13%" align="center"主题名称/td
td width="87%"input type="text" name="wj_topic" size="30" maxlength="50" value="%=rs("wj_topic")%"/td
/tr
tr class="tablebody" align="center"
td height="30" colspan="2"
input type="submit" name="submit" value="确定编辑" class="submit"
input type="reset" name="reset" value="清空重填" class="submit"
input type="hidden" name="topic_id" value="%=rs("topic_id")%"%rs.close:set rs=nothing%
input type="hidden" name="editaddtopic" value="true"/td
/tr
/form
/table
%
end if
end Sub
'==================================
'=过 程 名:mxtopic()
'=功 能:查看问卷明细
'==================================
sub mxtopic()
sql="select * from Ft_wjdctopic where topic_id="request("topic_id")
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,3
sql="select * from Ft_wjitem where idtopic="request("topic_id")
set rs2=server.createobject("adodb.recordset")
rs2.open sql,conn,1,3
%
table cellspacing="1" cellpadding="4" class="tableborder" align="center"
tr class="tablebody"
td colspan="3" class="td_title"问卷列表/td
/tr
tr class="tablebody"
td width="13%" align="center"主题/td
td width="60%" align="center"%if not rs.eof and not rs.bof then%%=rs("wj_topic")%%end if%/td
td width="27%" align="center"
a href="?topic_id=%=rs("topic_id")%action=additem"class="submit" 添加问卷项目 /a
/td
/tr
%i=1
do while not rs2.eof
sql="select * from Ft_wjitemson where iditem="rs2("item_id")
set rs3=server.createobject("adodb.recordset")
rs3.open sql,conn,1,3
%
tr class="tablebody"
td width="13%" align="center"项目明细%=i%/td
td width="60%" align="left"
%=rs2("wj_item")% %If rs2("item_stat")"" Or rs2("item_stat2")"" then%
a href="?action=nritem_id=%=rs2("item_id")%topic_id=%=rs("topic_id")%"查看其他/a
%End if%
%j=1
Do While Not rs3.eof%
br
(选项%=j%) %=rs3("wj_itemson")% a href="?topic_id=%=rs("topic_id")%itemson_id=%=rs3("itemson_id")%action=edititemson"编辑/a/a href="?topic_id=%=rs("topic_id")%itemson_id=%=rs3("itemson_id")%action=delitemson"删除/a 票数:%=rs3("wj_count")%
%
rs3.movenext
j=j+1
Loop
rs3.close:set rs3=nothing
%
/td
td width="27%" align="center"
a href="?topic_id=%=rs("topic_id")%item_id=%=rs2("item_id")%action=additemson"class="submit" 添加选项 /a
a href="?topic_id=%=rs("topic_id")%item_id=%=rs2("item_id")%action=edititem"class="submit" 编辑 /a
a href="?topic_id=%=rs("topic_id")%item_id=%=rs2("item_id")%action=delitem"class="submit" 删除 /a
/td
/tr
%i=i+1
rs2.movenext
loop
%
%
rs.close:set rs=Nothing
rs2.close:set rs2=Nothing
%
/table
%
end sub
'==================================
'=过 程 名:additem()
'=功 能:添加问卷项目
'==================================
Sub additem()
If request("additem")="true" Then
' wj_item=CheckSql("问卷项目",request.form("wj_item"),1,50)
'idtopic=request("idtopic")
sql="select * from Ft_wjitem"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,3
rs.addnew
rs("wj_item")=request("wj_item")
rs("idtopic")=request("idtopic")
rs("item_stat")=request("c1")
rs("item_stat2")=request("c2")
rs.update
rs.close:set rs=nothing
response.redirect "?action=mxtopictopic_id="request("idtopic")
end if%
table cellspacing="1" cellpadding="4" class="tableborder" align="center"
form name="form1" method="post" action=""
tr class="tablebody"
td colspan="2" class="td_title"新增问卷项目/td
/tr
tr class="tablebody"
td colspan="2" height="30"strongT I P S:/strong在新添了问卷主题后,应点击相应主题“编辑”功能或“新添选项”,添加问卷选项。/td
/tr
tr class="tablebody"
td width="13%" align="center"项目名称
/td
td width="87%"input type="text" name="wj_item" size="30" maxlength="50"
input type="radio" name="c1" value="1" checked单选
input type="radio" name="c1" value="2"多选 |
input type="radio" name="c2" value="1""其他"选项
input type="radio" name="c2" value="2""自由回答"选项
/td
/tr
tr class="tablebody" align="center"
td height="30" colspan="2"
input type="submit" name="submit" value="确定新增" class="submit"
input type="reset" name="reset" value="清空重填" class="submit"
input type="hidden" name="additem" value="true"
input type="hidden" name="idtopic" value="%=request("topic_id")%"
/td
/tr
/form
/table
%End Sub
'==================================
'=过 程 名:additemson()
'=功 能:添加问卷项目
'==================================
Sub additemson()
If request("additemson")="true" Then
' wj_item=CheckSql("问卷项目选项",request.form("wj_itemson"),1,50)
'idtopic=request("idtopic")
sql="select * from Ft_wjitemson"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,3
rs.addnew
rs("wj_itemson")=request("wj_itemson")
rs("idtopic")=request("idtopic")
rs("iditem")=request("iditem")
rs.update
rs.close:set rs=nothing
response.redirect "?action=mxtopictopic_id="request("idtopic")
end if%
table cellspacing="1" cellpadding="4" class="tableborder" align="center"
form name="form1" method="post" action=""
tr class="tablebody"
td colspan="2" class="td_title"新增选项项目/td
/tr
tr class="tablebody"
td colspan="2" height="30"strongT I P S:/strong在新添了问卷主题后,应点击相应选项“编辑”功能或“新添选项”,添加选项。/td
/tr
tr class="tablebody"
td width="13%" align="center"选项名称
/td
td width="87%"input type="text" name="wj_itemson" size="30" maxlength="50"/td
/tr
tr class="tablebody" align="center"
td height="30" colspan="2"
input type="submit" name="submit" value="确定新增" class="submit"
input type="reset" name="reset" value="清空重填" class="submit"
input type="hidden" name="additemson" value="true"
input type="hidden" name="idtopic" value="%=request("topic_id")%"
input type="hidden" name="iditem" value="%=request("item_id")%"
/td
/tr
/form
/table%
End Sub
'==================================
'=过 程 名:edititemson()
'=功 能:编辑问卷项目
'==================================
Sub edititemson()
If request("edititemson")="true" Then
sql="select * from Ft_wjitemson where itemson_id="request("itemson_id")
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,3
rs("wj_itemson")=request("wj_itemson")
rs.update
rs.close:set rs=nothing
response.redirect "?action=mxtopictopic_id="request("topic_id")
end If
sql="select * from Ft_wjitemson where itemson_id="request("itemson_id")
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,3
if not rs.eof and not rs.bof then
%
table cellspacing="1" cellpadding="4" class="tableborder" align="center"
form name="form1" method="post" action=""
tr class="tablebody"
td colspan="2" class="td_title"编辑选项项目/td
/tr
tr class="tablebody"
td colspan="2" height="30"strongT I P S:/strong在新添了问卷主题后,应点击相应选项“编辑”功能或“新添选项”,添加选项。/td
/tr
tr class="tablebody"
td width="13%" align="center"项目名称
/td
td width="87%"input type="text" name="wj_itemson" size="30" maxlength="50" value="%=rs("wj_itemson")%"/td
/tr
tr class="tablebody" align="center"
td height="30" colspan="2"
input type="submit" name="submit" value="确定新增" class="submit"
input type="reset" name="reset" value="清空重填" class="submit"
input type="hidden" name="edititemson" value="true"
/td
/tr
/form
/table%End if
End Sub
'==================================
'=过 程 名:edititem()
'=功 能:编辑问卷项目主题
'==================================
Sub edititem()
If request("edititem")="true" Then
sql="select * from Ft_wjitem where item_id="request("item_id")
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,3
rs("item_stat")=request("c1")
rs("item_stat2")=request("c2")
rs("wj_item")=request("wj_item")
rs.update
rs.close:set rs=nothing
response.redirect "?action=mxtopictopic_id="request("topic_id")
end If
sql="select * from Ft_wjitem where item_id="request("item_id")
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,3
if not rs.eof and not rs.bof then
%
table cellspacing="1" cellpadding="4" class="tableborder" align="center"
form name="form1" method="post" action=""
tr class="tablebody"
td colspan="2" class="td_title"编辑选项项目/td
/tr
tr class="tablebody"
td colspan="2" height="30"strongT I P S:/strong在新添了问卷主题后,应点击相应选项“编辑”功能或“新添选项”,添加选项。/td
/tr
tr class="tablebody"
td width="13%" align="center"项目名称
/td
td width="87%"input type="text" name="wj_item" size="30" maxlength="50" value="%=rs("wj_item")%"
input type="radio" name="c1" value="1" %If rs("item_stat")=1 then%checked%End if%单选
input type="radio" name="c1" value="2"%If rs("item_stat")=2 then%checked%End if%多选 |
input type="radio" name="c2" value="1"%If rs("item_stat2")=1 then%checked%End if%"其他"选项
input type="radio" name="c2" value="2"%If rs("item_stat2")=2 then%checked%End if%"自由回答"选项
/td
/tr
tr class="tablebody" align="center"
td height="30" colspan="2"
input type="submit" name="submit" value="确定新增" class="submit"
input type="reset" name="reset" value="清空重填" class="submit"
input type="hidden" name="edititem" value="true"
/td
/tr
/form
/table%End if
End Sub
'==================================
'=过 程 名:deltopic()
'=功 能:删除主题
'==================================
Sub deltopic()
sql="delete* from Ft_wjdctopic where topic_id="request("topic_id")
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,3
sql="delete* from Ft_wjitem where idtopic="request("topic_id")
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,3
sql="delete* from Ft_wjitemson where idtopic="request("topic_id")
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,3
response.redirect "?action=list"
End Sub
'==================================
'=过 程 名:delitem()
'=功 能:删除主题项目
'==================================
Sub delitem()
sql="delete* from Ft_wjitem where item_id="request("item_id")
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,3
sql="delete* from Ft_wjitemson where iditem="request("item_id")
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,3
sql="delete* from Ft_wjnr where iditem="request("item_id")
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,3
response.redirect "?action=mxtopictopic_id="request("topic_id")
End Sub
'==================================
'=过 程 名:delitemson()
'=功 能:删除主题项目选项
'==================================
Sub delitemson()
sql="delete* from Ft_wjitemson where itemson_id="request("itemson_id")
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,3
response.redirect "?action=mxtopictopic_id="request("topic_id")
End Sub
'==================================
'=过 程 名:nr()
'=功 能:删除主题项目选项
'==================================
Sub nr()
sql="select* from Ft_wjnr where iditem="request("item_id")
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,3
%
table cellspacing="1" cellpadding="4" class="tableborder" align="center"
form name="form1" method="post" action=""
tr class="tablebody"
td colspan="2" class="td_title"其他问卷项目主观部分/td
/tra href="?action=mxtopictopic_id=%=request("topic_id")%"返回/a
%k=1
Do While Not rs.eof %
tr class="tablebody"
td colspan="2" height="30"%=k%、%=rs("nr")%
hr
/td
/tr
%rs.movenext
k=k+1
Loop
%
/form
/table
%
rs.close:set rs=nothing
End Sub
'#####################
'==================================
'=过 程 名:fb()
'=功 能: 发布主题
'==================================
Sub fb()
sql="select* from Ft_wjdctopic"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,3
Do While Not rs.eof
rs("stat")=0
rs.update
rs.movenext
loop
rs.close:set rs=Nothing
sql="select* from Ft_wjdctopic where topic_id="request("topic_id")
set rs2=server.createobject("adodb.recordset")
rs2.open sql,conn,1,3
rs2("stat")=1
rs2("wj_date")=Now()
rs2.update
rs2.close:set rs2=Nothing
response.redirect "?action=list"
End Sub
'!--#include file="Ft_admin_bottom.asp"--
%
怎么用PHP做问卷调查
首先是设计好数据库,看看你的问卷调查需要什么样的内容,都有哪些字段。
然后根据数据库进行编码,其中包括PHP 处理程序以及前端显示的html代码。
用户提交后PHP处理从前台传来的数据,然后保存到数据库中。具体详细的可以私下联系我
调查问卷php源码的介绍就聊到这里吧,感谢你花时间阅读本站内容,更多关于html问卷调查源码、调查问卷php源码的信息别忘了在本站进行查找喔。
