<% 'Here is a sample of how to use the Captcha image verification ' ########################################################################### ' ###### ' ###### Example 2 Form file. ' ###### ' ########################################################################### Dim firstname_err, lastname_err, email_err, phone_err, company_err, url_err, comment_err, option1_err, option2_err, option3_err, option4_err, option5_err, option6_err, option7_err, heard_err, specify_err, errmsg Dim ShowHTMLForm, Submit, Refresh, Submit_button, proceed Dim PathOfImageFolder Const captcha_DB_filename = "/include/fn.dat" Const forReading = 1 PathOfImageFolder = "/images/cimg/" 'Each error must be past by Session Variables or by the querystring for this Example I am passing them through session variables. firstname_err = Session("firstname_err") lastname_err = Session("lastname_err") email_err = Session("email_err") phone_err = Session("phone_err") company_err = Session("company_err") url_err = Session("url_err") comments_err = Session("comments_err") option1_err = Session("option1_err") option2_err = Session("option2_err") option3_err = Session("option3_err") option4_err = Session("option4_err") option5_err = Session("option5_err") option6_err = Session("option6_err") option7_err = Session("option7_err") heard_err = Session("heard_err") specify_err = Session("specify_err") errmsg = Session("errmsg") Session("firstname_err") = "" Session("lastname_err") = "" Session("email_err") = "" Session("phone_err") = "" Session("company_err") = "" Session("url_err") = "" Session("comment_err") = "" Session("option1_err") = "" Session("option2_err") = "" Session("option3_err") = "" Session("option4_err") = "" Session("option5_err") = "" Session("option6_err") = "" Session("option7_err") = "" Session("heard_err") = "" Session("errmsg") = "" if Session("ThisPageOption1") <> "" then Session("ThisPageOption1")= " checked" end if if Session("ThisPageOption2") <> "" then Session("ThisPageOption2")= " checked" end if if Session("ThisPageOption3") <> "" then Session("ThisPageOption3")= " checked" end if if Session("ThisPageOption4") <> "" then Session("ThisPageOption4")= " checked" end if if Session("ThisPageOption5") <> "" then Session("ThisPageOption5")= " checked" end if if Session("ThisPageOption6") <> "" then Session("ThisPageOption6")= " checked" end if function getImageMappings() dim cmap(191) 'Create a filesystem object Dim FSO Set FSO = server.createObject("Scripting.FileSystemObject") Dim Filepath Filepath = Server.MapPath(captcha_DB_filename) if FSO.FileExists(Filepath) then Dim file set file = FSO.GetFile(Filepath) Dim TextStream Set TextStream = file.OpenAsTextStream(forReading, -2) i = 1 do while not TextStream.AtEndOfStream Dim Line Line = TextStream.readline Line = Split(Line, ",") 'response.write Line cmap(i) = Line(1) i = i + 1 loop Session("Captcha_Mapping") = cmap end if Set FSO = nothing end function function generateImage() upperlimit = 191 lowerlimit = 1 Randomize imageRandNum = Int((upperlimit - lowerlimit + 1)*Rnd() + lowerlimit) filenum= CStr(imageRandNum) Session("captcha_num") = imageRandNum Session("captcha_image") = PathOfImageFolder & filenum & ".jpg" 'Change the path if necessary. getImageMappings() end function generateImage() %> BoldFocus, Inc. | Contact

We would love to hear from you!

">

* Required Fields
<%=firstname_err%>First Name: * ">
<%=lastname_err%>Last Name: * ">
<%=email_err%>E-mail: * ">
<%=phone_err%>Phone: ">
<%=company_err%>Company: ">
<%=url_err%>Site URL ">
 
<%=comments_err%>Comments:
 
Please contact me regarding the following:
> <%=option1_err%>Web Site Design & Development
> <%=option2_err%>Content Management Solutions
> <%=option3_err%>Web Site Maintenance
> <%=option4_err%>Search Engine Optimization
> <%=option5_err%>Social Media (i.e. Facebook, blog)
> <%=option6_err%>Google Apps
 
<%=heard_err%>I heard about BoldFocus from:
<%=errmsg%>
" alt="" name="captcha" id="captcha" width="200" height="55" vspace="5" border="0">
This field helps prevent automated access.
Enter the text.

 
 

24 hour Support:
650-212-2653 x719

Corporate Headquarters:
BoldFocus, Inc.
1900 South Norfolk Street, Suite 350
San Mateo, CA 94403
Tel: 650-212-BOLD (2653)
Fax: 650-212-2654

<% Session("ThisPageOption1") = "" Session("ThisPageOption2") = "" Session("ThisPageOption3") = "" Session("ThisPageOption4") = "" Session("ThisPageOption5") = "" Session("ThisPageOption6") = "" %>