PHP Online Questionnaire Survey program A

Source: Internet
Author: User
Tags php online contact form

Also used yesterday to a PHP online questionnaire survey program Oh, customers want to advertise in Sina, so to count the user related information, okay, let's look at the effect page first

<title> Questionnaire Survey </title>
<meta http-equiv= "Content-type" content= "text/html; charset=gb2312 ">
<style type= "Text/css" >
<!--
Body {
Background-color: #330104;
Text-align:center;
Background-image:url (images/bg.jpg);
Background-repeat:repeat-x;
Color: #fee0a8;
margin:0px;
padding:0px;
}
* {
margin:0px;
padding:0px;
}
#poll {
width:650px;
margin-left:100px;
}
#poll H1 {
font-size:12px;
Font-weight:normal;
padding-top:30px;
line-height:22px;
height:22px;
}
Table.pollt {
line-height:24px;
height:24px;
margin-top:22px;
}
Input.inputt {
border:1px solid #FEE0A8;
Background-color: #FFF9EC;
}
INPUT.BTN {
Background-image:url (images/btn.gif);
Display:block;
height:32px;
width:97px;
Color: #FEE0A8;
border-top-width:0px;
border-right-width:0px;
border-bottom-width:0px;
border-left-width:0px;
Border-top-style:none;
Border-right-style:none;
Border-bottom-style:none;
Border-left-style:none;
Background-color: #240002;
}
-->
</style>
<script>
<!--

function Check () {
var flag1=0;
var flag2=0;
var flag3=0;
var flag4=0;
var flag5=0;
var flag6=0;
var radio1=document.getelementsbyname ("v1");
for (Var i=0;i<radio1.length;i++)
{
if (Radio1.item (i). Checked==true)
{
Flag1=1;
Break

}
}
var radio2=document.getelementsbyname ("V2");
for (Var i=0;i<radio2.length;i++)
{
if (Radio2.item (i). Checked==true)
{
Flag2=1;
Break
}
}
var radio3=document.getelementsbyname ("V3");
for (Var i=0;i<radio3.length;i++)
{
if (Radio3.item (i). Checked==true)
{
Flag3=1;
Break
}
}
var radio4=document.getelementsbyname ("V4");
for (Var i=0;i<radio4.length;i++)
{
if (Radio4.item (i). Checked==true)
{
Flag4=1;
Break
}
}
var radio5=document.getelementsbyname ("V5");
for (Var i=0;i<radio5.length;i++)
{
if (Radio5.item (i). Checked==true)
{
Flag5=1;
Break
}
}
var radio6=document.getelementsbyname ("V6");
for (Var i=0;i<radio6.length;i++)
{
if (Radio6.item (i). Checked==true)
{
Flag6=1;
Break
}
}

if (!flag1| |! flag2| |! flag3| |! flag4| |! flag5| |! FLAG6) {
Alert ("Excuse me, please answer the other questions?");
return false;
}

if (add.name.value== "") {
Alert ("Please enter a username!") ");
Add.name.focus ();
return false;
}
if (add.name.value.length<2 | | add.name.value.length>14) {
Alert ("The name should be between 2-14 characters!") ");
Add.name.focus ();
return false;
}
if (add.tel.value== "") {
Alert ("Please enter your phone number! ");
Add.tel.focus ();
return false;
}
if (add.email.value== "") {
Alert ("Please enter your e-mail address!") ");
Add.email.focus ();
return false;
}
var filter=/^s* ([a-za-z0-9_-]+ (. w+) *@ (w+.) +w{2,3}) s*$/;
if (!filter.test (Document.add.email.value)) {
Alert ("Email address is not correct, please fill in again!") ");
Document.add.email.focus ();
Document.add.email.select ();
return (false);
}
if (Add.address.value = = "") {
Alert ("Please enter your contact form")
Add.email.focus ();
return false;
}

}

-->
</SCRIPT>
<body bgcolor= "#FFFFFF" leftmargin= "0" topmargin= "0" marginwidth= "0" marginheight= "0" >
<!--imageready Slices (Questionnaire survey. PSD)-->
<table id= "__01" width= "1002" height= "1100" border= "0" cellpadding= "0" cellspacing= "0" >
<tr>
&LT;TD colspan= "2" >
</td>
</tr>
<tr>
&LT;TD colspan= "2" >
</td>
</tr>
<tr>
&LT;TD height= "811" colspan= "2" valign= "Top" background= "Images/index_03.jpg" >
<div id= "Poll" >
<form action= "post.php" method= "POST" name= "Add" enctype= "Multipart/form-data" onsubmit= "return check ();" >
<input name= "v1" type= "Radio" value= "300 years" >300 year
<input name= "v1" type= "Radio" value= "400 years" >400 year
<input name= "v1" type= "Radio" value= "1000" >1000 Year

<H1>2, Luzhou-flavor liquor is also known as what kind of flavor? <input name= "v2" type= "Radio" value= "Sauce-flavor" > Sauce flavor
<input name= "v2" type= "Radio" value= "Odd flavor" > Odd flavor
<input name= "v2" type= "Radio" value= "Lu" > LU type

<input name= "v3" type= "Radio" value= "The Golden Prize of Panama Universal Exposition" > Panama Expo
<input name= "v3" type= "Radio" value= "Brazil Exposition gold medal" > Brazil Exposition Gold Medal
<input name= "v3" type= "Radio" value= "Panama Sugar and Tobacco Cocktail Reception Gold Award" > Panama Sugar and tobacco cocktail party gold medal

<input name= "v4" type= "Radio" value= "Material cultural heritage" > Material cultural Heritage
<input name= "v4" type= "Radio" value= "Intangible cultural Heritage" > Intangible Cultural Heritage

<input name= "V5" type= "Radio" value= "Gold Collection" > Gold Collection
<input name= "V5" type= "Radio" value= "Fragrant Fragrance" > Handed down Fragrance
<input name= "V5" type= "Radio" value= "Handed down Collection" > Collection

<input name= "V6" type= "Radio" value= "2 bottles" >2 bottle
<input name= "V6" type= "Radio" value= "4 bottles" >4 bottle
<input name= "V6" type= "Radio" value= "6 bottles" >6 bottle
<table class= "Pollt" width= "489" border= "0" cellpadding= "0" cellspacing= "0" >
<tr>
&LT;TD width= "108" > Your name </td>
&LT;TD width= "381" ><label>
<input type= "text" class= "Inputt" name= "name" id= "Name" >
</label></td>
</tr>
<tr>
<td> your phone </td>
<td><input type= "text" class= "Inputt" name= "Tel" id= "Tel" ></td>
</tr>
<tr>
<td> your e-mail</td>
<td><input type= "text" class= "Inputt" name= "email" id= "email" ></td>
</tr>
<tr>
<td> your contact Method </td>
<td><input name= "Address" type= "text" class= "Inputt" id= "Address" size= "M" ></td>
</tr>
</table>
<table border= "0" align= "center" cellpadding= "0" cellspacing= ">"
<tr>
&LT;TD align= "center" ><input name= "type=" Submit "class=" BTN "value=" submitted "></td>
&LT;TD align= "center" ><input name= "reset" type= "reset" class= "BTN" value= "re-reply" ></td>
</tr>
</table>
</form>


</div>
</td>
</tr>
<tr>
<td>
</td>
<td>
</td>
</tr>
</table>

<!--end ImageReady Slices-->
</body>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.