%
option explicit
Response.Buffer = True
%>
<%
'@BEGINVERSIONINFO
'@APPVERSION: 5.10.10
'@FILENAME: mailsubscribe.asp
'@FILEVERSION: 1.0.1
'@VERSIONDATETIME: 2/21/01
'@DESCRIPTION: Allows Customer to Subscribe to Merchant Mailing List
'@STARTCOPYRIGHT
'The contents of this file is protected under the United States
'copyright laws and is confidential and proprietary to
'LaGarde, Incorporated. Its use or disclosure in whole or in part without the
'expressed written permission of LaGarde, Incorporated is expressly prohibited.
'
'(c) Copyright 2000, 2001 by LaGarde, Incorporated. All rights reserved.
'@ENDCOPYRIGHT
'@ENDVERSIONINFO
%>
Join Mailing List
<%
Dim rsCust, sFirstName, sLastName,sPassword,sConfirmPass,sEmail, sSql
sEmail = Trim(Request.Form("emailadd"))
If semail <> "" then
sFirstName = Trim(Request.Form("fname"))
sLastName = Trim(Request.Form("lname"))
sPassword = Trim(Request.Form("password"))
sConfirmPass = Trim(Request.Form("passwordconfirm"))
Set rsCust = Server.CreateObject("ADODB.RecordSet")
sSql="Select * From sfCustomers where custEmail = " & "'" & sEmail & "'"
rsCust.Open sSql , cnn, adOpenKeyset, adLockOptimistic, adCmdText
if rsCust.EOF =false and rsCust.BOF =false then
'rsCust.Fields("custFirstName") = sfirstname
'rsCust.Fields("custLastName") = slastName
rsCust.Fields("custPasswd") = spassword
rsCust.Fields("custIsSubscribed") = 1
rsCust.Update
else
closeObj(rsCust)
sSql = " Select * from sfCustomers "
rsCust.Open sSql , cnn, adOpenKeyset, adLockOptimistic, adCmdText
rsCust.AddNew
rsCust.Fields("custFirstName") = sfirstname
rsCust.Fields("custLastName") = slastName
rsCust.Fields("custPasswd") = spassword
rsCust.Fields("custEmail") = sEmail
rsCust.Fields("custIsSubscribed") = 1
rsCust.Update
end if
closeObj(rsCust)
Else
closeObj(rsCust)
sfirstname =""
slastname = ""
spassword =""
sconfirmpass=""
sEmail =""
End If
%>
<%
closeObj(cnn)
%>