Hi,
I can't seem to find the error in this line of code.
I always get an 'expected 'end'" error.
<%
naam = Trim(request.form("name"
)
email = Trim(request.form("email"
)
comment = Trim(request.form("comment"
)
IF INSTR( email, "@" ) = 0 OR INSTR( email, "." ) = 0 THEN
invalidEmail = TRUE
end if
If naam = "" OR content= "" Then
error = TRUE %>
<!DOCTYPE HTML PUBLIC "-//W3Cco
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<%
If error <> true AND invalidemail <> true then
set objMail = server.Createobject("CDONTS.NewMail"
ObjMail.From = email
ObjMail.To = "my_email"
Objmail.Subject = "blabla"
'objMail.BCC = "ENTER BCC ADDRESS HERE IF REQUIRED"
objMail.body = "Feedback form. Details below" & vbnewLine & vbNewLine &_
"--------------------------------------------------------" & vbnewLine & vbNewLine &_
"Name: " & naam & vbnewLine & vbNewLine &_
"email: " & email & vbnewLine & vbNewLine &_
"Comments: " & comment & vbnewLine & vbNewLine
objMail.send
Set objmail = Nothing
response.Write("Thankyou for your comments."
ELSE
response.Write("You have not entered sufficient information please go back and try again"
End if
%>
</body>
</html>
I can't seem to find the error in this line of code.
I always get an 'expected 'end'" error.
<%
naam = Trim(request.form("name"
email = Trim(request.form("email"
comment = Trim(request.form("comment"
IF INSTR( email, "@" ) = 0 OR INSTR( email, "." ) = 0 THEN
invalidEmail = TRUE
end if
If naam = "" OR content= "" Then
error = TRUE %>
<!DOCTYPE HTML PUBLIC "-//W3Cco
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<%
If error <> true AND invalidemail <> true then
set objMail = server.Createobject("CDONTS.NewMail"
ObjMail.From = email
ObjMail.To = "my_email"
Objmail.Subject = "blabla"
'objMail.BCC = "ENTER BCC ADDRESS HERE IF REQUIRED"
objMail.body = "Feedback form. Details below" & vbnewLine & vbNewLine &_
"--------------------------------------------------------" & vbnewLine & vbNewLine &_
"Name: " & naam & vbnewLine & vbNewLine &_
"email: " & email & vbnewLine & vbNewLine &_
"Comments: " & comment & vbnewLine & vbNewLine
objMail.send
Set objmail = Nothing
response.Write("Thankyou for your comments."
ELSE
response.Write("You have not entered sufficient information please go back and try again"
End if
%>
</body>
</html>