Forum Moderators: open
I have no clue about asp and have been asked by a client to create a registration form.
Totally crude, I know, but I've created an image of a calculation question and I'm getting users to add the numbers together and checked against an asp script I have written.
However, when I use it, it gives me the error:
Microsoft VBScript runtime error '800a000d'Type mismatch: '[string: ""]'
/booking-form/sendit.asp, line 97
Here's the code I've written and the HTML form part that's relevant. Any ideas?
Thanks
HTML
...
<img src="what-is.gif" alt="img-q" width="87" height="19"/><br />
<input type="input" name="captcha" value="" /><br /><br />
<input type="submit" name="submit" value="Submit" class="submit">
ASP
<%
' send email if captcha = 12
Dim captcha
captcha = Request.Form("captcha")
if captcha = 12 Then
Dim mail
Set mail = Server.CreateObject("CDONTS.NewMail")
mail.To = EmailTo
mail.From = EmailFrom
mail.Subject = Subject
mail.Body = Body
mail.Send
' redirect to success page
Response.Redirect("ok.htm?" & EmailFrom)
Else
Response.Redirect("error.htm?" & EmailFrom)
End If
%>