Hello everyone,
I have a simple form which is failing to post. I have looked high and low. Can you help?
I have taken out some HTML to clear it up. Here id the form which displays resultd from a request.querystring and puts them into hidden fields (this page works fine, QS display fully.
and here is the submission page, which execute a Stored procedure which inserts EXCEPT for the "submission id" and emails a notification
can you help?
To be successful inlife, you must thing your less then the person next to you.
I have a simple form which is failing to post. I have looked high and low. Can you help?
I have taken out some HTML to clear it up. Here id the form which displays resultd from a request.querystring and puts them into hidden fields (this page works fine, QS display fully.
Code:
<input type="hidden" name ="prodco"value="<%Request.querystring("prodCo")%>">
<%=Request.querystring("prodCo")%><br>
<input type="hidden" name ="prodname" value="<%=Request.querystring("prodname")%>">
<%=Request.querystring("prodname")%><br>
<input type="hidden" name ="id" value="<%=Request.querystring("id")%>">
<%=Request.querystring("id")%><br>
<input type="hidden" name ="redirecter" value="<%=Request.querystring("redirecter")%>">
<%=Request.querystring("redirecter")%><br>
<h1>Production Company Reply Site</h1>
<%if request.querystring("sent")= 1 then %>
Thank you, your message has been sent. You will be contacted within 28 days.
<%else%>
<form name="replyemail" method="post" action="reply.asp">
Your contact name</td><td><input type="text" name="txtSender"></td>
<td>Reply</td><td><textarea name="txtMessage" style="width:400px;height:100px;"></textarea></td>
input type="submit" name="submit" value="Send Message" />
</form>
<%end if%>
and here is the submission page, which execute a Stored procedure which inserts EXCEPT for the "submission id" and emails a notification
Code:
<%@LANGUAGE="vbscript"%>
<%
Dim sqlInsName, con, SP_EmailSend, submissionid , message, sender
submissionid = request.form("id")
message = request.form("txtMessage")
sender = request.form("txtSender")
toEmail = request.form("redirecter")
prodCo = request.form("prodco")
prodname = request.form("prodname")
set con = server.createobject("ADODB.Connection")
con.open = "driver={SQL Server};server=;uid=;pwd=;database="
sqlInsName = "EXEC SP_EmailSend '" & submissionid & "', '" & message& "', '" & sender& "'"
con.Execute(sqlInsName)
Dim objCDO
Set objCDO = Server.CreateObject("CDONTS.NewMail")
objCDO.To = toEmail
objCDO.From = "nondelivery@skyone.co.uk"
objCDO.Subject = "Producer -" & prodname & "have replyed"
HTML = HTML & "<HTML>"
HTML = HTML & "<HEAD>"
HTML = HTML & "<TITLE>Sky Commissioning Site</TITLE>"
HTML = HTML & "</HEAD>"
HTML = HTML & "<BODY bgcolor=""White"">"
HTML = HTML & " a reply has been sent."
HTML = HTML & "<BR><BR>"
HTML = HTML & "</BODY>"
HTML = HTML & "</HTML>"
objCDO.BodyFormat = 0
objCDO.MailFormat = 0
objCDO.Body = HTML
objCDO.Send
Set objCDO = Nothing
response.write submissionid
response.write message
response.write sender
response.write toEmail
response.write prodCo
response.write prodname
'response.redirect("default.asp?Sent=1")
%>
can you help?
To be successful inlife, you must thing your less then the person next to you.