Forums
This topic is locked
email conformation problem via CDonts....
Posted 06 Sep 2001 12:09:48
1
has voted
06 Sep 2001 12:09:48 ben tilford posted:
Hi All,Does anyone know why ikeep getting the following error message?:
Microsoft VBScript compilation error '800a0411'
Name redefined
/favouritesonline/dynamic_pages/register_confirm.asp, line 25
Dim strRecipient
----^
and here is the page code:
<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="../Connections/conFavourites.asp" -->
<%
Dim rsSubmitConfirm__strUserName
rsSubmitConfirm__strUserName = "xyz"
if (Session("svUserName" <> "" then rsSubmitConfirm__strUserName = Session("svUserName"
%>
<%
set rsSubmitConfirm = Server.CreateObject("ADODB.Recordset"
rsSubmitConfirm.ActiveConnection = MM_conFavourites_STRING
rsSubmitConfirm.Source = "SELECT * FROM MemberDetails WHERE UserName = '" + Replace(rsSubmitConfirm__strUserName, "'", "''" + "'"
rsSubmitConfirm.CursorType = 0
rsSubmitConfirm.CursorLocation = 2
rsSubmitConfirm.LockType = 3
rsSubmitConfirm.Open()
rsSubmitConfirm_numRows = 0
%>
<%
Dim strRecipient <-------line 25!!!!!!
strRecipient = rsSubmitConfirm.Fields.Item("Email".Value
%>
<%
Dim strRecipient
Dim strFirstName
Dim strLastName
Dim strUserName
Dim strPassword
strRecipient = rsSubmitConfirm.Fields.Item("Email".Value
strFirstName = rsSubmitConfirm.Fields.Item("FirstName".Value
strLastName = rsSubmitConfirm.Fields.Item("LastName".Value
strUserName = rsSubmitConfirm.Fields.Item("UserName".Value
strPassword = rsSubmitConfirm.Fields.Item("Password".Value
%>
<%
Dim objCDO
Set objCDO = Server.CreateObject("CDONTS.NewMail"
objCDO.From = " "
objCDO.Subject = "Your Registration Details"
objCDO.Body = "<font face='arial' size ='3'>" &_
"hiya!" &strFirstName& "" &strLastName&_
"<br>" &_
"this is your email conformation from favouritesonline.com " &_
"<br>" &_
"here r your details:"&_
"<p>"&_
"username:"&strUserName&_
"<br>"&_
"password:"&strPassword&_
"<p>"&_
"go to <a href='www.favouritesonline.com'>www.favouritesonline.com</a> to log on..." &_
"<p>" &_
"cheers," &_
"<br>" &_
"the fantastic staff" &_
"<br>" &_
"favouritesonline.com" &_
"</font>"
objCDO.send()
Set objCDO = Nothing
%>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" href="../css_s/site_text.css" type="text/css">
</head>
<style>
<!--
BODY{
scrollbar-face-color:#003399;
scrollbar-arrow-color:#000066;
scrollbar-track-color:#003399;
scrollbar-shadow-color:'#ffffff';
scrollbar-highlight-color:#ffffff;
scrollbar-3dlight-color:#000066;
scrollbar-darkshadow-Color:'#000066';
}
-->
</style>
<body topmargin=0 leftmargin=0 bgcolor="#000066" text="#000000">
<table width="670" border="0" cellpadding="0" cellspacing="0">
<tr bgcolor="#003399">
<td height="30" valign="top" colspan="3"><img src="../content_sections/content_top.gif" width="670" height="30"></td>
</tr>
<tr>
<td width="29" height="490" valign="top" background="../content_sections/content_left.gif" bgcolor="#003399"> </td>
<td width="611" valign="top" bgcolor="#003399">
<table width="591" border="0">
<tr>
<td width="513"> </td>
<td width="14"> </td>
</tr>
<tr>
<td width="513" class="all_text"><font size="3"><b>welcome <%=(rsSubmitConfirm.Fields.Item("FirstName".Value)%> <%=(rsSubmitConfirm.Fields.Item("LastName".Value)%>!</b></font></td>
<td width="14"> </td>
</tr>
<tr>
<td width="513" class="all_text"> </td>
<td width="14"> </td>
</tr>
<tr>
<td width="513" class="all_text" height="39">here is your login info:</td>
<td width="14" height="39"> </td>
</tr>
<tr>
<td width="513" class="all_text">username:<b><%=(rsSubmitConfirm.Fields.Item("UserName".Value)%></b></td>
<td width="14"> </td>
</tr>
<tr>
<td width="513" class="all_text" height="13">password:<b><%=(rsSubmitConfirm.Fields.Item("Password".Value)%></b> (remember, keep this a secret!)</td>
<td width="14" height="13"> </td>
</tr>
<tr>
<td width="513" class="all_text"> </td>
<td width="14"> </td>
</tr>
<tr>
<td width="513" class="all_text">we have sent your registration info
to: <%=(rsSubmitConfirm.Fields.Item("Email".Value)%>...</td>
<td width="14"> </td>
</tr>
<tr>
<td width="513" height="48"><span class="all_text">click <a href="login.asp" target="_self" class="all_text">here</a>
to login...</span>.</td>
<td width="14" height="48"> </td>
</tr>
<tr>
<td width="513" height="14"><span class="all_text">have u read the <a href="../terms_n_conditions/terms_n_agreements.html" class="all_text">terms
and conditions</a>?...i hope so..</span>.</td>
<td width="14" height="14"> </td>
</tr>
</table>
<pre> </pre>
</td>
<td width="30" valign="top" background="../content_sections/content_right.gif" bgcolor="#000066"> </td>
</tr>
<tr bgcolor="#003399">
<td height="30" valign="top" colspan="3"><img src="../content_sections/content_bottom.gif" width="670" height="30"></td>
</tr>
</table>
<p> </p>
</body>
</html>
<%
rsSubmitConfirm.Close()
%>
Cheers...Ben...
Replies
Replied 06 Sep 2001 13:04:27
06 Sep 2001 13:04:27 Waldo Smeets replied:
The error message tells that the variable 'strRecipient' is being defined a second time (you define a new variable using DIM). But defining something (the variable) that already exists returns an error.
When you look at the code you have multiple instances of 'Dim strRecipient' (see 2 lines below the error line for example). I suggest that you delete all these duplicated lines. Then it might work.
Waldo Smeets - www.UDzone.com Webmaster
<font size=1>-------------------------------------------
<i>Please read the Forum FAQ before posting
a question to this TalkZone.</i>
-------------------------------------------
www.UDzone.com : A dynamic Dreamweaver,
Ultradev and Fireworks site for developers
by developers.
-------------------------------------------</font id=size1>
When you look at the code you have multiple instances of 'Dim strRecipient' (see 2 lines below the error line for example). I suggest that you delete all these duplicated lines. Then it might work.
Waldo Smeets - www.UDzone.com Webmaster
<font size=1>-------------------------------------------
<i>Please read the Forum FAQ before posting
a question to this TalkZone.</i>
-------------------------------------------
www.UDzone.com : A dynamic Dreamweaver,
Ultradev and Fireworks site for developers
by developers.
-------------------------------------------</font id=size1>