Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Why won't this work?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Forum LockedWhy won't this work?

 Post Reply Post Reply
Author
coniston View Drop Down
Newbie
Newbie
Avatar

Joined: 18 October 2007
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote coniston Quote  Post ReplyReply Direct Link To This Post Topic: Why won't this work?
    Posted: 18 October 2007 at 10:24am

Please help someone, this is process form asp page.

It does not seem to see blnCAPTCHAcodeCorrect at all...can someone point me in the right direction please?
 
 
================================================================
 
<!-- #include file="general.asp" -->
<!-- #include file="CAPTCHA/CAPTCHA_process_form.asp" -->  
<style type="text/css" media="all">
   <!-- @import url("style/coniston.css"); -->
  </style>
      
<%
'If CAPTCHA is entered correctly run the following code
If blnCAPTCHAcodeCorrect Then
       'Place code here that is to run if CAPTCHA is entered correctly
    response.write ("it is working")
   
    'If CAPTCHA is NOT entered correctly run the following code
ElseIf blnCAPTCHAcodeCorrect Then
       'Place code here that is to run if CAPTCHA is NOT entered correctly
       response.write "<center><font class='textheader'>You entered an incorrect code.<p>Please press the back button and retry.</center></font>"
End If
%>
<%   
 
Set objUpload = Server.CreateObject("Persits.Upload.1")
objUpload.overwritefiles = true
uploadDir = "E:\websites\demosite\coniston\images"
'uploadDir = "D:\wwwroot\berger\files"
fileCount = objUpload.Save(uploadDir)
' Retrieve form variables

Set FeedFullName = objUpload.form ("FeedFullName")
Set FeedTelephone = objUpload.form ("FeedTelephone")
Set FeedOrganisation = objUpload.form ("FeedOrganisation")
Set Feedback = objUpload.form ("Feedback")
' Retrieve file details
For each file in objUpload.files
  newFile = File.Path
next
' Check for new file upload
if newFile <> "" Then
  ImageDiagram = right(newFile, len(newFile) - (len(uploadDir) + 1))
  else ImageDiagram = ""
end if
 
Set objUpload = Nothing

  
  
  
  
  'objConn.execute strSQLInsert
  'response.write strSQLInsert
 'response.end
  
  
 strBody = "<html>" & vbCrLf
strBody = strBody & "<head>" & vbCrLf
strBody = strBody & "<title>Coniston IT - Feedback </title>" & vbCrLf
strBody = strBody & "<meta http-equiv=""Content-Type"" content= ""text/html; charset=iso-8859-1"">" & vbCrLf
strBody = strBody & "<body>" & vbCrLf
strBody = strBody & "<table  border= ""0""   cellpadding=""2"" cellspacing=""0"">" & vbCrLf
strBody = strBody & "<tr>"& vbCrLf
'strBody = strBody & "<td colspan='2'><IMG SRC='http://mydomain.com/tragus/images/emailHeader.jpg'  BORDER='0'></td>" & vbCrLf
strBody = strBody & "</tr>" & vbCrLf
strBody = strBody & "<tr><tdwidth='40%'><font color='#000000'>Thank you <b> " & FeedFullName & " </b>for submitting your feedback.</font> &nbsp;</td>"
strBody = strBody & "<tr><td><font color='#000000'> Your details have been recored as below</font> &nbsp;</td>"
strBody = strBody & "<tr><td><font color='#000000'>Name:<b> " & FeedFullName & " </b> </font> &nbsp;</td>"
strBody = strBody & "<tr><td><font color='#000000'>Telephone:<b> " & FeedTelephone & " </b> </font> &nbsp;</td>"
strBody = strBody & "<tr><td><font color='#000000'>Organisation:<b> " & FeedOrganisation & " </b> </font> &nbsp;</td>"
strBody = strBody & "<tr><td><font color='#000000'>Query:<b> " & Feedback & " </b> </font> &nbsp;</td>"
strBody = strBody & "<tr><td><font color='#000000'></font> &nbsp;</td>"
strBody = strBody & "<tr><td><font color='#000000'>Yours sincerely</font> &nbsp;</td>"
strBody = strBody & "<tr><td><font color='#000000'>XYZ Company</font> &nbsp;</td>"
strBody = strBody & "</table>"& vbCrLf
strBody = strBody & "</body>"& vbCrLf
strBody = strBody & "</html>"& vbCrLf
'Set Mail = Server.CreateObject("Persits.MailSender")
Set Mail = Server.CreateObject("SMTPsvg.Mailer")
Mail.FromName   = client@xyzcompany.com
Mail.FromAddress= "xyz@xyzcompany.com"
Mail.AddRecipient "joe", jo@xyzcompany.com
Mail.ContentType = "text/html"
'   >>> OLD SMTP RELAY >>> Mail.RemoteHost = "relay.mail.sccis.net"
Mail.RemoteHost = "smtp.blah.net"
Mail.Subject    = "Website Feedback"
Mail.BodyText   = strBody
if Mail.SendMail then
 ' Response.Write "Mail sent..."
else
  Response.Write "Mail send failure. Error was " & Mail.Response
end if
Set Mail = Nothing 
response.write "<center><font class='textheader'>Thankyou for submitting your feedback.<p>Please close this window to continue browsing our website.</center></font>"
 

%>
 
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 18 October 2007 at 10:33am
You need to tell it to do something if the CAPTCHA code is incorrect. At the moment you tell it to display that the CAPTCHA code is incorrect, but then let it continue on to process the rest of the file.

You maybe better off following the Simple CAPTCHA install documentation and just have it redirect to a new page that you create that says that the CAPTCHA code is wrong and to go back.
Back to Top
coniston View Drop Down
Newbie
Newbie
Avatar

Joined: 18 October 2007
Status: Offline
Points: 3
Post Options Post Options   Thanks (0) Thanks(0)   Quote coniston Quote  Post ReplyReply Direct Link To This Post Posted: 18 October 2007 at 11:03am
Hello, thanks for the quick reply.
 
Did this instead :
 
Input form
=======

<html>
<head>
 <title>Feedback</title>
 <style type="text/css" media="all">
   <!-- @import url("style/coniston.css"); -->
  </style>
</head>
<body topmargin="0" leftmargin="0">
 
 

<form  enctype="multipart/form-data"  action="pete.asp" method="post">

<table align="center" cellspacing="2" cellpadding="2" border="0">
<tr>
<td  colspan="2" bgcolor="#003082"><img src="images/poplogo.jpg" width="132" height="33" border="0" alt=""></td>
</tr>
<tr>
<td colspan="2" class="plaintext">
<b>Contact Us</b><br>
Please complete the following details and we will contact you shortly.
 

</td>
</tr>
 
 
<tr>
    <td class="plaintext">Name:</td>
    <td><input type="text" name="FeedFullName" value="<%=FeedFullName%>" size="60" style="color: #460046; font: 11px Verdana; border-width: 1; border-color: #000000; border-style: solid;"></td>
  
</tr>
<tr>
    <td class="plaintext">Contact Number:</td>
    <td><input type="text" name="FeedTelephone" value="<%=FeedTelephone%>" size="60" style="color: #460046; font: 11px Verdana; border-width: 1; border-color: #000000; border-style: solid;"></td>
 
</tr>
<tr>
    <td class="plaintext">Organisation:</td>
    <td><input type="text" name="FeedOrganisation" value="<%=FeedOrganisation%>" size="60" style="color: #460046; font: 11px Verdana; border-width: 1; border-color: #000000; border-style: solid;"></td>
 
</tr>
<tr>
    <td class="plaintext">Query:</td>
    <td><textarea cols="59" rows="6" name="Feedback" value="<%=Feedback%>" style="color: #460046; font: 11px Verdana; border-width: 1; border-color: #000000; border-style: solid;"></textarea>
 
 <!-- include the Web Wiz CAPTCHA form element -->
    <!--#include file="CAPTCHA/CAPTCHA_form_inc.asp" -->
</td>
  
</tr>
<tr>
    <td colspan="2" align="center"><input type="submit" name="submit" value="Submit" style="color: #460046; font: 11px Arial; border-width: 1; border-color: #000000; border-style: solid;"></td>
</tr>
<tr>
<td  colspan="2" bgcolor="#003082" align="center" class="plaintext"><font color="white"><b>Or call us on: (0191) 519 7300</b></font></td>
</tr>
</table>
</form>
</body>
</html>
 
=================
 
Process form
=========
 
<!-- #include file="general.asp" -->
<!-- #include file="CAPTCHA/CAPTCHA_process_form.asp" -->  
<style type="text/css" media="all">
   <!-- @import url("style/coniston.css"); -->
  </style>
      

<%   
 
Set objUpload = Server.CreateObject("Persits.Upload.1")
objUpload.overwritefiles = true
uploadDir = "E:\websites\demosite\coniston\images"
'uploadDir = "D:\wwwroot\berger\files"
fileCount = objUpload.Save(uploadDir)
' Retrieve form variables

Set FeedFullName = objUpload.form ("FeedFullName")
Set FeedTelephone = objUpload.form ("FeedTelephone")
Set FeedOrganisation = objUpload.form ("FeedOrganisation")
Set Feedback = objUpload.form ("Feedback")
' Retrieve file details
For each file in objUpload.files
  newFile = File.Path
next
' Check for new file upload
if newFile <> "" Then
  ImageDiagram = right(newFile, len(newFile) - (len(uploadDir) + 1))
  else ImageDiagram = ""
end if
 
Set objUpload = Nothing

  
  
  
  
  'objConn.execute strSQLInsert
  'response.write strSQLInsert
 'response.end
  
  
 strBody = "<html>" & vbCrLf
strBody = strBody & "<head>" & vbCrLf
strBody = strBody & "<title>Coniston IT - Feedback </title>" & vbCrLf
strBody = strBody & "<meta http-equiv=""Content-Type"" content= ""text/html; charset=iso-8859-1"">" & vbCrLf
strBody = strBody & "<body>" & vbCrLf
strBody = strBody & "<table  border= ""0""   cellpadding=""2"" cellspacing=""0"">" & vbCrLf
strBody = strBody & "<tr>"& vbCrLf
'strBody = strBody & "<td colspan='2'><IMG SRC='http://demo.thecreativecake.com/tragus/images/emailHeader.jpg'  BORDER='0'></td>" & vbCrLf
strBody = strBody & "</tr>" & vbCrLf
strBody = strBody & "<tr><tdwidth='40%'><font color='#000000'>Thank you <b> " & FeedFullName & " </b>for submitting your feedback.</font> &nbsp;</td>"
strBody = strBody & "<tr><td><font color='#000000'> Your details have been recored as below</font> &nbsp;</td>"
strBody = strBody & "<tr><td><font color='#000000'>Name:<b> " & FeedFullName & " </b> </font> &nbsp;</td>"
strBody = strBody & "<tr><td><font color='#000000'>Telephone:<b> " & FeedTelephone & " </b> </font> &nbsp;</td>"
strBody = strBody & "<tr><td><font color='#000000'>Organisation:<b> " & FeedOrganisation & " </b> </font> &nbsp;</td>"
strBody = strBody & "<tr><td><font color='#000000'>Query:<b> " & Feedback & " </b> </font> &nbsp;</td>"
strBody = strBody & "<tr><td><font color='#000000'></font> &nbsp;</td>"
strBody = strBody & "<tr><td><font color='#000000'>Yours sincerely</font> &nbsp;</td>"
strBody = strBody & "<tr><td><font color='#000000'>Consiton Helpdesk</font> &nbsp;</td>"
strBody = strBody & "</table>"& vbCrLf
strBody = strBody & "</body>"& vbCrLf
strBody = strBody & "</html>"& vbCrLf
'Set Mail = Server.CreateObject("Persits.MailSender")
Set Mail = Server.CreateObject("SMTPsvg.Mailer")
Mail.FromName   = "xxycompany"
Mail.FromAddress= xyz@xyzcompany.com
Mail.AddRecipient "xyz", me@xyzcompany.com
Mail.ContentType = "text/html"
'   >>> OLD SMTP RELAY >>> Mail.RemoteHost = "relay.mail.sccis.net"
Mail.RemoteHost = "smtp.onyx.net"
Mail.Subject    = "Website Feedback"
Mail.BodyText   = strBody
if Mail.SendMail then
 ' Response.Write "Mail sent..."
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.