J
Justin
Guest
I created a website where if the user wants to be a member i would send them a validation code. I got that far to the point where they would need to enter the validation code my problem now is that they keep going to the validation code page every time they log in. It seems that the counter(its is set to 1 when they register my plan is that it becomes 2 when they enter their validation code) field in my db doesn't get updated, can you fix it for me please I am stuck here for a day already. Act_code is the validation number. Here is my code on the button in the enter validation code page
Dim actcode As String
MyCommand.CommandText = "select * from member where MemberID='" & Session("strID") & "'"
MyCommand.Connection = myConnection
MyReader = MyCommand.ExecuteReader
MyReader.Read()
actcode = MyReader("Act_Code")
MyReader.Close()
If (actcode = Pword.Text) Then
MyCommand.CommandText = "update memmber set " & _
" Counter='" & Replace(Label1.Text, "'", "''") & "'," & _
" where Act_Code = " & Pword.Text
MyCommand.Connection = myConnection
Response.Redirect("members_home.aspx")
Else
Invalid1.Text = "Invalid Activation Code"
End If
MyCommand.Dispose()
MyReader.Close()
Dim actcode As String
MyCommand.CommandText = "select * from member where MemberID='" & Session("strID") & "'"
MyCommand.Connection = myConnection
MyReader = MyCommand.ExecuteReader
MyReader.Read()
actcode = MyReader("Act_Code")
MyReader.Close()
If (actcode = Pword.Text) Then
MyCommand.CommandText = "update memmber set " & _
" Counter='" & Replace(Label1.Text, "'", "''") & "'," & _
" where Act_Code = " & Pword.Text
MyCommand.Connection = myConnection
Response.Redirect("members_home.aspx")
Else
Invalid1.Text = "Invalid Activation Code"
End If
MyCommand.Dispose()
MyReader.Close()