/    Sign up×
Community /Pin to ProfileBookmark

Please help with my form, I am going crazy

I am about to lose my mind and need some help. I have tried several different contact forms in both php and aspx and I cant get anything to work. I am not sure if it is me or GoDaddy (most likely me). Now I have found out that there are suppose to be either a php or aspx form that GoDaddy wants you to use but I think I deleted them a long time. Anyway I am using the Windows/Shared Hosting account. Here is the code for my form and the aspx I am using.

contact.aspx
<body>

<% [at] Language=”VBSCRIPT” %>
<% If Request.ServerVariables(“REQUEST_METHOD”) = “POST” Then
*
*
Send Email
‘*
Dim strBOD
strBOD = “Name: ” & Request.Form(“name”) & vbCrLf _
& “Email: ” & Request.Form(“email”) & vbCrLf & vbCrLf _

& Request.Form(“comments”)
Dim objCFG
Set objCFG = Server.CreateObject(“CDO.Configuration”)
objCFG.Fields.Item(aCDO & “sendusing”) = 2
objCFG.Fields.Item(aCDO & “smtpserver”) =
“exodusarts.secureserver.net”
objCFG.Fields.Item(aCDO & “smtpserverport”) = 25
objCFG.Fields.Update
Dim objCDO
Set objCDO = Server.CreateObject(“CDO.Message”)
objCDO.Configuration = objCFG
objCDO.From = Request.Form(“email”)
objCDO.To = “[email protected]
objCDO.Subject = “Contact Form”
objCDO.TextBody = strBOD
objCDO.Send
Set objCDO = Nothing
Set objCFG = Nothing
End If
%>

</body>
</html>

contact.htm

<body>

<form name=”email” action=”contact.asp” method=”post”>
<p>Name:<br>
<input type=”text” name=”name” size=”25″></p>
<p>Email address:<br>
<input type=”text” name=”name” size=”25″></p>
<p>Comments<br>
<textarea rows=”10″ cols=”60″ name=”comments”></textarea></p>
<input type=”submit” value=”Send” /></p>
</form>

</body>

Here is the error I get:

Microsoft VBScript compilation error ‘800a03ea’

Syntax error

/contact.asp, line 24

objCFG.Fields.Item(aCDO & “smtpserver”) =
—————————————–^

to post a comment
HTML

2 Comments(s)

Copy linkTweet thisAlerts:
@Pete1980Jun 07.2011 — Not sure if this helps or not, but your Name text field and email text fields are both name="name"
Copy linkTweet thisAlerts:
@wh666-666Jun 07.2011 — Shouldnt be pete, should just populate the field with the value name ... Im no expert in asp, in fact I hate it! But .....

Is this all the code? Seems like somethings missing?

Your error suggests an error near this line:
[CODE]objCDO.Subject = "Contact Form"
objCDO.TextBody = strBOD
objCDO.Send
Set objCDO = Nothing
Set objCFG = Nothing[/CODE]


However I dont see the issue, you remembered to destroy CDO objects you created ...


Anyway a massive hint is the error 800a03ea ... Syntax error ... so go back to those lines, look for an error ... Could be something quite simple, however I cant see it at this moment ...



In the top part of code, shouldnt that be in the head, correct me if im wrong?

It would be useful to see all the code or an example of the page you are trying to work this in to .....




Hopefully someone alot more experienced in asp can help. You might want to ask a mod to move this to here:

http://www.webdeveloper.com/forum/forumdisplay.php?f=9
×

Success!

Help @fallencircus spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...