Voting Batman translation Finishing
A very good ASP program to build your own voting system. Read it carefully, and as long as you can understand the key technologies in the middle, you can build your own polling station on your website. The papers were hastily sorted out and I hope you will understand.
All rights reserved:
ASP Polls
Version 1.0
Tipped Cow Development and adrenalin Labs
Structure Simple Introduction:
Access database design structure:
Poll table primary field name: Pollname,pollcreator,pollquestion,password,choice1,choice2
Choice3,choice4,choice5,id (AutoNumber), GetName
Pollresults table fields: Pollid,pollanswer,name
1. Document Db.inc
<%
Application ("asp_poll") = "Asp_poll"
cnstring = "Driver={microsoft Access DRIVER (*.mdb)};"
cnstring = cnstring & "dbq=" & Server.MapPath ("Events.mdb")
Application ("asppolldsn") = cnstring
%>
1. Document Creat_poll1.asp
<% title= "Poll Generator"%>
<title><%=Title%></title>
<body>
<div align= "left" ><br" >another Joint product from <a href= "Http://www.ncws.com/tippycow" >tipped Cow development</a> and <a href= "http://dstoflet.calweb.com" >adrenalin labs</a>
<br><br>
</div>
<center>
<%
Response.Write "<font face= ' Arial ' >"
If Request ("errormessage") <> "Then
Response.Write "<b>error! </b> "& Request (" ErrorMessage ")
Else
Response.Write "Please complete the form below to begin creating your own."
End If
%>
<br><br>
<table border=2 cellspacing=0 cellpadding=0><tr><td>
<form method= "POST" action= "create_poll2.asp" >
<table border=0 cellspacing=0 cellpadding=10 width=500><tr>
<TD colspan=2 bgcolor= #000000 align=center class= "Bold2" >
Enter Your Name as the Poll Creator
</td>
</tr><tr>
<TD bgcolor= #ffffff width=25% class= "bold" >poll creator:</td>
<TD bgcolor= #ffffff >
<input type= "text" Name= "creator" value= "<%=request (" creator ")%>" size=20 class= "Input" >
</td>
</tr>
</table>
</td></tr>
<tr><td>
<table border=0 cellspacing=0 cellpadding=10 width=500><tr>
<TD colspan=2 bgcolor= #000000 align=center class= "Bold2" >
Create a Password for Your Poll and Can Modify It at a
Later time
</td>
</tr><tr>
<TD bgcolor= #ffffff width=25% class= "bold" >poll Admin password:</td>
<TD bgcolor= #ffffff >
<input type= "password" name= "password" value= <%=request ("password")%> "size=10 maxlength=10 Class=input>
</td>
</tr>
</table>
</td></tr>
<tr><td>
<table border=0 cellspacing=0 cellpadding=10 width=500><tr>
<TD colspan=2 bgcolor= #000000 align=center class= "Bold2" >
Give Your Poll a Unique Name
</td>
</tr><tr>
<TD bgcolor= #ffffff width=25% class= "bold" >poll name:</td>
<TD bgcolor= #ffffff >
<input type= "text" name= "name" value= "<%=request (" name ")%>" Size=20 class=input>
</td>
</tr>
</table>
<table border=0 cellspacing=0 cellpadding=10 width=500><tr>
<TD colspan=2 bgcolor= #000000 align=center class= "Bold2" >
Do your want to have the user enter their name?
</td>
</tr><tr>
<TD bgcolor= #ffffff width=25% class= "bold" >require user to enter their name:</td>
<TD bgcolor= #ffffff class= "Bold" >
Yes<input type= "Radio" name= "GetName" value= "1" ><br>
No <input type= "Radio" name= "GetName" value= "0" checked>
</td>
</tr>
</table>
</td></tr>
<tr><td>
<table border=0 cellspacing=0 cellpadding=10 width=500><tr>