Change Password

<% If Session("Authorized") = "physician" Then ' check passwords if request("oldpassword") <> "" then if request("oldpassword")<> session("password") then 'Display message saying the passwords don't match message = "Your current password and the one you just entered don't match. Password not changed." successmsg = "" else if request("newpassword")<>request("confirmpassword") then successmsg = "" message = "The New Password and Confirmation Password don't match. Password not changed." else Set oDbConn = Server.CreateObject("ADODB.Connection") oDbConn.Open "driver={Microsoft Access Driver (*.mdb)}; dbq=" & Server.MapPath ("physicians.mdb") strSQL = "UPDATE docpass set password = '" & request("newpassword") &"' where ID = " & clng(session("userid")) oDbConn.execute(strSql) message = "" successmsg = "Password changed Successfully" end if end if end if %>

<%=message %>
Old Password:

New Password:

Confirm Password:

<%=successmsg%> <% Else response.redirect("pp_login.asp") End If %>