SaintMackem
asked on
Code now working, and I don't know why!!!
Firstly is anyone aware of the Web Wiz - Captcha....I am sure there are people.
right my asp below should work, but doesn't. I need to understand why it doesn't. Can an ASP expert please help me out
I use the simple install and use the redirect if incorrect in captcha_setup.asp...but it always redirects regardless whether it is right or wrong!!
Help!!!
My input file
=========
<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-da ta" 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:</t d>
<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">Organisa tion:</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_proc ess_form.a sp" -->
<style type="text/css" media="all">
<!-- @import url("style/coniston.css"); -->
</style>
<%
Set objUpload = Server.CreateObject("Persi ts.Upload. 1")
objUpload.overwritefiles = true
uploadDir = "E:\websites\demosite\coni ston\image s"
'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> </td>"
strBody = strBody & "<tr><td><font color='#000000'> Your details have been recored as below</font> </td>"
strBody = strBody & "<tr><td><font color='#000000'>Name:<b> " & FeedFullName & " </b> </font> </td>"
strBody = strBody & "<tr><td><font color='#000000'>Telephone: <b> " & FeedTelephone & " </b> </font> </td>"
strBody = strBody & "<tr><td><font color='#000000'>Organisati on:<b> " & FeedOrganisation & " </b> </font> </td>"
strBody = strBody & "<tr><td><font color='#000000'>Query:<b> " & Feedback & " </b> </font> </td>"
strBody = strBody & "<tr><td><font color='#000000'></font> </td>"
strBody = strBody & "<tr><td><font color='#000000'>Yours sincerely</font> </td>"
strBody = strBody & "<tr><td><font color='#000000'>bbb Helpdesk</font> </td>"
strBody = strBody & "</table>"& vbCrLf
strBody = strBody & "</body>"& vbCrLf
strBody = strBody & "</html>"& vbCrLf
'Set Mail = Server.CreateObject("Persi ts.MailSen der")
Set Mail = Server.CreateObject("SMTPs vg.Mailer" )
Mail.FromName = "WWW.clientaccounts@bbb.co.uk"
Mail.FromAddress= "billy@bbb.com"
Mail.AddRecipient "billy", "billy@bbb.co.uk"
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..."
else
Response.Write "Mail send failure. Error was " & Mail.Response
end if
Set Mail = Nothing
response.write "<center><font class='textheader'>Thankyo u for submitting your feedback.<p>Please close this window to continue browsing our website.</center></font>"
%>
right my asp below should work, but doesn't. I need to understand why it doesn't. Can an ASP expert please help me out
I use the simple install and use the redirect if incorrect in captcha_setup.asp...but it always redirects regardless whether it is right or wrong!!
Help!!!
My input file
=========
<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-da
<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:</t
<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%>"
</tr>
<tr>
<td class="plaintext">Organisa
<td><input type="text" name="FeedOrganisation" value="<%=FeedOrganisation
</tr>
<tr>
<td class="plaintext">Query:</
<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
</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_proc
<style type="text/css" media="all">
<!-- @import url("style/coniston.css");
</style>
<%
Set objUpload = Server.CreateObject("Persi
objUpload.overwritefiles = true
uploadDir = "E:\websites\demosite\coni
'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"
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> </td>"
strBody = strBody & "<tr><td><font color='#000000'> Your details have been recored as below</font> </td>"
strBody = strBody & "<tr><td><font color='#000000'>Name:<b> " & FeedFullName & " </b> </font> </td>"
strBody = strBody & "<tr><td><font color='#000000'>Telephone:
strBody = strBody & "<tr><td><font color='#000000'>Organisati
strBody = strBody & "<tr><td><font color='#000000'>Query:<b> " & Feedback & " </b> </font> </td>"
strBody = strBody & "<tr><td><font color='#000000'></font> </td>"
strBody = strBody & "<tr><td><font color='#000000'>Yours sincerely</font> </td>"
strBody = strBody & "<tr><td><font color='#000000'>bbb Helpdesk</font> </td>"
strBody = strBody & "</table>"& vbCrLf
strBody = strBody & "</body>"& vbCrLf
strBody = strBody & "</html>"& vbCrLf
'Set Mail = Server.CreateObject("Persi
Set Mail = Server.CreateObject("SMTPs
Mail.FromName = "WWW.clientaccounts@bbb.co.uk"
Mail.FromAddress= "billy@bbb.com"
Mail.AddRecipient "billy", "billy@bbb.co.uk"
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..."
else
Response.Write "Mail send failure. Error was " & Mail.Response
end if
Set Mail = Nothing
response.write "<center><font class='textheader'>Thankyo
%>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SaintMakem,
Since cookies are required that means sessions are involved. You need to make sure your sever is not load balanced against multiple machines (no session integrity) or spread amoung multiple servers (as in a server farm). Also, if there are restrictions on SESSION usage on the server, you will have a problem too.
Since cookies are required that means sessions are involved. You need to make sure your sever is not load balanced against multiple machines (no session integrity) or spread amoung multiple servers (as in a server farm). Also, if there are restrictions on SESSION usage on the server, you will have a problem too.
If so, paste that code here as well.