philogin_admin-profile_update
<% Option Explicit Dim sql, rsUser, username, password, firstname, surname, email, dob, sex, notfilled(5), badflag, count, passwordLength, calltype, starsign, dobmonth, dobday if Request.Cookies("philoginadmin") = "True" then username = Request.Form("username") 'Assign form values to variables password = Request.Form("password") firstname = Request.Form("firstname") surname = Request.Form("surname") email = Request.Form("email") sex = Request.Form("sex") dob = Request.Form("birth_day") & "/" & Request.Form("birth_month") & "/" & Request.Form("birth_year") 'Check everything's been filled in, badflag determines whether error function is called badflag = 0 if firstname = "" then notfilled(0) = "First Name" badflag = 1 end if if surname = "" then notfilled(1) = "Surname" badflag = 1 end if if email = "" then notfilled(2) = "Email" badflag = 1 end if if sex = "" then notfilled(3) = "Sex" badflag = 1 end if if IsDate(dob) = "False" then notfilled(4) = "Date of Birth" badflag = 1 end if if password = "" then notfilled(5) = "Password" badflag = 1 end if if badflag = 1 then signuperror() end if 'Open connection and insert user details into the database %> <% getstarsign() Set rsUser = Server.CreateObject("ADODB.Recordset") rsUser.open "users WHERE username = '" & username & "'", conn, 3, 3 rsUser("password") = password rsUser("firstname") = firstname rsUser("surname") = surname rsUser("email") = email rsUser("dob") = dob rsUser("starsign") = starsign rsUser("sex") = sex rsUser.Update rsUser.close set rsUser = nothing conn.close set conn = nothing Response.Redirect("philogin_admin-profile.asp?username=" & username & "&updated=true") else Response.Redirect("philogin_admin.asp") end if %> <% Function getstarsign() dobmonth = Request.Form("birth_month") dobday = Request.Form("birth_day") Select Case dobmonth Case 1 if dobday < 21 then starsign = "Capricorn" else starsign = "Aquarius" end if Case 2 if dobday < 20 then starsign = "Aquarius" else starsign = "Pisces" end if Case 3 if dobday < 21 then starsign = "Pisces" else starsign = "Aries" end if Case 4 if dobday < 21 then starsign = "Aries" else starsign = "Taurus" end if Case 5 if dobday < 22 then starsign = "Taurus" else starsign = "Gemini" end if Case 6 if dobday < 22 then starsign = "Gemini" else starsign = "Cancer" end if Case 7 if dobday < 24 then starsign = "Cancer" else starsign = "Leo" end if Case 8 if dobday < 24 then starsign = "Leo" else starsign = "Virgo" end if Case 9 if dobday < 24 then starsign = "Virgo" else starsign = "Libra" end if Case 10 if dobday < 24 then starsign = "Libra" else starsign = "Scorpio" end if Case 11 if dobday < 23 then starsign = "Scorpio" else starsign = "Sagittarius" end if Case 12 if dobday < 22 then starsign = "Sagittarius" else starsign = "Capricorn" end if End Select End Function %> <%Function signuperror()%> Your Profile

Bütün Boşlukları Düzün Olarak Doldurmadınız:

<%for count = 0 to 5%> <%if notfilled(count) <> "" then%> <%=notfilled(count)%>
<%end if%> <%next%>

Lütfen Tekrar Deneyin

<%Response.end End Function%>
 
Bugün 26 ziyaretçi (39 klik) kişi burdaydı!
Bu web sitesi ücretsiz olarak Bedava-Sitem.com ile oluşturulmuştur. Siz de kendi web sitenizi kurmak ister misiniz?
Ücretsiz kaydol