Hi,
I am updating a website for my final year project at university, I was wondering if anyone can help.
I am trying to write a script that allows the user to update their email address.
which is also their login. I have written the following script, however, its just adds the new email address as oppose to replacing it. can anyone tell me where i'm going wrong?
<%
Dim strNEW 'New email string
Dim strCONFIRM 'Confirmed email string
Dim strOLD 'old email address string
strOLD = Trim(Request.Form("User_Login") )
strNEW = Trim(Request.Form("New_email") )
strCONFIRM = Trim(Request.Form("Confirm_email") )
%>
<!--#include file="dbOpen.asp"-->
<%
If (strNew <> strCONFIRM) Then
Response.Redirect("my_email_retry.asp")
Else
'qry="select user_id from tblRegUser WHERE user_Email ='" + strNEW + "'"
'set rsChk = Conn.execute(qry)
'IF rsChk.EOF THEN
Conn.BeginTrans
qry="Insert Into tblRegUser(user_Email) VALUES('" & strNEW & "')"
Conn.execute(qry)
Conn.CommitTrans
'END IF
Response.Redirect("disp_login.asp")
%>
<% End IF %>