%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<%
Dim error_msg
if session("login") = "" then
response.Redirect("member_login.asp")
response.End()
end if
login = request("login")
password = request("password")
firstname = request("firstname")
lastname = request("lastname")
address = request("address")
city = request("city")
stateabbr = request("stateabbr")
zip = request("zip")
country = request("country")
telephone = request("telephone")
email = request("email")
website = request("website")
submit = request("submit")
if submit <> "" then
if login = "" then push_error "Invalid login."
if record_exists_edit_level_1( "tbl_member", "login", "memberid", login, 0, session("memberid"), 1) then push_error "Login code is already taken."
if password = "" then push_error("Invalid password")
if firstname = "" then push_error("Firstname cannot be blank.")
if lastname = "" then push_error("Lastname cannot be blank.")
if address = "" then push_error("Address cannot be blank.")
if city = "" then push_error("City cannot be blank.")
if stateabbr = "" then push_error("State cannot be blank.")
if zip = "" then push_error("Zip cannot be blank.")
if country = "" then push_error("Country cannot be blank.")
if telephone = "" then push_error("Telphone cannot be blank.")
if email = "" then push_error("Email address cannot be blank.")
if not IsValidEmail(email) then push_error("Invalid email address: " & email)
if record_exists_edit_level_1( "tbl_member", "email", "memberid", email, 0, session("memberid"), 1) then push_error "Email address is already taken."
if error_msg = "" then
Set Edit_Cmd = Server.CreateObject("ADODB.Command")
Edit_Cmd.ActiveConnection = MM_Connection_String
arr_cols = "login|password|firstname|lastname|address|city|stateabbr|zip|country|telephone|email"
arr_values = parse(login) & "|" & parse(password) & "|" & parse(firstname) & "|" & parse(lastname) & "|" & parse(address) & "|" & parse(city) & "|" & parse(stateabbr) & "|" & parse(zip) & "|" & parse(country) & "|" & parse(telephone) & "|" & parse(email)
Edit_Cmd.CommandText = update_command("tbl_member", "memberid", 1, session("memberid"), arr_cols, arr_values)
' response.Write( "the command = " & Edit_Cmd.CommandText )
' response.end()
Edit_Cmd.Execute
Edit_Cmd.ActiveConnection.Close
session("firstname") = firstname
session("login") = login
response.Redirect("myaccount.asp")
response.End()
end if
else
Set rs = Server.CreateObject("ADODB.Recordset")
rs.ActiveConnection = MM_Connection_STRING
rs.Source = "SELECT * from tbl_member where login = '" & session("login") & "'"
rs.CursorType = 0
rs.CursorLocation = 2
rs.LockType = 1
rs.Open()
if NOT rs.eof then
login = rs("login")
password = rs("password")
firstname = rs("firstname")
lastname = rs("lastname")
address = rs("address")
city = rs("city")
stateabbr = rs("stateabbr")
zip = rs("zip")
country = rs("country")
telephone = rs("telephone")
email = rs("email")
website = rs("website")
end if
end if
sub push_error(str)
if error_msg <> "" then error_msg = error_msg & "
"
error_msg = error_msg & "— " & str
end sub
%>
ETT - Update account
| |
|
|
|
| |
HOLIDAY TIPS
5 tips for surviving the
holidays...that will
ensure "good health
and good looks"
> more
|
|
|
| |
|
|
Update account
 |
<%if error_msg <> "" then%>
<%end if%>
|
|
|