Solved

ASP: I am trying to insert Captcha into my form and submit the form

Posted on 2011-09-16
3
302 Views
Last Modified: 2012-05-12
I am trying to insert Captcha into my form and submit the form for to action="procformNews.asp"

my index.asp seems to work and the captcha works, submitting to the example_process_form,
which verifies if the captcha security code was accepted or not. But the submit form in the file
example_process_form  ... called 'procformNews.asp' is not submitting the form in the file index.asp??

<form action="procformNews.asp" method="post" name="form1" id="form1">

what am I do wrong?


+++++++++++++++++++++++++++++++++++++
index.asp
+++++++++++++++++++++++++++++++++++++

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- Include file for CAPTCHA configuration -->
<!-- #include file="CAPTCHA/CAPTCHA_configuration.asp" --> 
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">

<title>West Design - Web Design, Web Applications Development, Graphic Design for Small Business - Medford, Ashland, Eagle Point, Rogue Valley, Southern Oregon</title>


<link href="wd-style-combined.css" rel="stylesheet" type="text/css">

<script type="text/javascript" src="http://use.typekit.com/mem8tms.js"></script>
<script type="text/javascript">try{Typekit.load();}catch(e){}</script>
<style type="text/css">
<!--
.style1 {
	color: #FFFFFF;
	font-weight: bold;
}
-->
</style>

<noscript>
<a href="http://deluxe-menu.com">Javascript Menu by Deluxe-Menu.com</a>
</noscript>
<script type="text/javascript">var dmWorkPath = "menudir/";</script>
<script type="text/javascript" src="menudir/dmenu.js"></script>
<!-- (c) 2007, http://deluxe-menu.com --> 

</head>

<body>
<center>
<form action="example_process_form.asp" method="post" name="form1" id="form1">
<table border="0"> 
<tr><td width="38" align="right"> Full Name</td><td width="160" align="left"> <input class="spacing" Name="fullname" type="text" size="20" /></td></tr>
<!--<tr><td width="38" align="right">Last Name</td><td width="160" align="left"> <input class="spacing" Name="lastName" type="text" size="20" /></td></tr>-->

<tr><td width="38" align="right">Email</td><td width="160" align="left"><input Name="email" class="spacing" type="text" size="20" value="Enter your email" /></td></tr>

<tr><td colspan="2" align="center"><input Name="maillist" value="WestDesign_Business_Newsletter" type="hidden"/>

<input Name="fromemailaddr" value="news@dianewestdesign.com" type="hidden"/>

<input Name="Nameofnewsletter" value="West Design" type="hidden"/>

<input Name="URl" value="http://www.dianewestdesign.com/" type="hidden"/>

   <!-- include the Web Wiz CAPTCHA form element -->
   <!--#include file="CAPTCHA/CAPTCHA_form_inc.asp" -->
  
<input type="submit" value="Sign Me Up!"></td></tr>
<tr>
<td colspan="2" align="center"><p class="centered"><a href="newsletter-archive.html">View a recent issue</a></p></td></tr></table>

</form>
</div>
</body>
</html>

+++++++++++++++++++++++++++++++++++++
example_process_form
+++++++++++++++++++++++++++++++++++++

<%@LANGUAGE="VBSCRIPT" %>
<!-- Include file for CAPTCHA configuration -->
<!-- #include file="CAPTCHA/CAPTCHA_configuration.asp" --> 
 
<!-- Include file for CAPTCHA form processing -->
<!-- #include file="CAPTCHA/CAPTCHA_process_form.asp" -->           
<%

'The line below will prevent the rest of the file from processing if the CAPTCHA code is entered incorrectly
'To use the line below remove the comment (') quote mark from in front of the line 
'If blnCAPTCHAcodeCorrect = False Then Call stopProcess()
	
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Web Wiz CAPTCHA Demo</title>
<style type="text/css">
<!--
.title {font-family: Arial, Helvetica, sans-serif; font-size: 14px; font-weight: bold; }
.header {font-family: Arial, Helvetica, sans-serif; font-size: 18px; font-weight: bold; }
.text {font-size: 12px; font-family: Arial, Helvetica, sans-serif;}
.small {font-size: 10px}
body { background-color: #CCCCCC; }
-->
</style>
</head>
<body>
<div align="center" class="header"> Web Wiz CAPTCHA <br />
  <br />
</div>
<form action="procformNews.asp" method="post" name="form1" id="form1">
  <table width="300" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#000000">
    <tr>
      <td bgcolor="#FFFFFF"><table width="100%" border="0" cellspacing="1" cellpadding="3">
          <tr>
            <td><span class="title">Demo Form</span></td>
          </tr>
          <tr>
            <td><span class="text">Thank-you
              <% = Server.HTMLEncode(Request("fullname")) %><br />
              <% = Server.HTMLEncode(Request("email")) %><br />

              <% = Server.HTMLEncode(Request("maillist")) %><br />
              <% = Server.HTMLEncode(Request("fromemailaddr")) %><br />
              <% = Server.HTMLEncode(Request("Nameofnewsletter")) %><br />
              <% = Server.HTMLEncode(Request("URl")) %>

              </span></td>
          </tr>
          <tr>
            <td class="text"><br />
              The CAPTCHA image code was entered:-<br />
              <span class="title"><%


'The variable 'blnCAPTCHAcodeCorrect' will be set to true if the security code is entered correctly

If blnCAPTCHAcodeCorrect Then 
	
	Response.Write("Correctly")
   
Else

	Response.Write("Incorrectly!!")
End If
              
              %></span><br />
              <br />
              <a href="index.asp">Return</a><br />
            </td>
          </tr>
        </table></td>
    </tr>
  </table>
</form>
</body>
</html>

Open in new window

0
Comment
Question by:westdh
  • 2
3 Comments
 
LVL 14

Accepted Solution

by:
nishant joshi earned 500 total points
ID: 36549109
<form action="procformNews.asp" method="get" name="form1" id="form1">
0
 

Author Comment

by:westdh
ID: 36549705
the 'get' in the second form

<form action="procformNews.asp" method="get" name="form1" id="form1">
did not submit the form.

the added captcha code works. but this form does not and how does it get submitted???
0
 

Author Closing Comment

by:westdh
ID: 36551502
Thanks
0

Featured Post

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Post a good COM tutorial 1 54
Classic ASP - problem with MS SQL Select Query? 10 58
SQL to update characters in table column 6 127
What .NET URL re-routing tool did I use? 2 56
I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:  The Exchange of information …
For a while now I'v been searching for a circular progress control, much like the one you get when first starting your Silverlight application. I found a couple that were written in WPF and there were a few written in Silverlight, but all appeared o…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question