Change Password

CrerveVeP

New Member
Actually i am trying to create change password for users.So for that i am using session variable<BR>but the problem is when i am taking session variable to other asp and givind response.write <BR>it&#039s not showing the values i don&#039t know why i am pasteing my code here for both the files<BR>Could somebody look at it and give me the sugguestions<BR><BR><%<BR>if request.form("a1") <> "" then<BR>Set Con = Server.CreateObject("ADODB.Connection")<BR>Con.Open "DSN=test"<BR>SET RS = Server.CreateObject("ADODB.Recordset")<BR>RS.CursorType = adOpenStatic<BR>RS.Open "Select employee_code, employee_name from EmpMaster where user_name = &#039" & request.form("a1") & "&#039 and password = &#039" & request.form("a2") & "&#039", Con<BR>if RS.EOF then<BR>response.write "<p>incorrect logon credentials supplied ! </P>"<BR>else<BR>session("un")=RS("user_name")<BR>session("pass")=RS("Password")<BR>end if<BR>RS.Close<BR>Con.Close<BR>end if<BR>%><BR><BR><BR>code for second asp file<BR><BR><%<BR>response.write session("un")<BR>response.write session("pass") <BR>&#039Set Con = Server.CreateObject("ADODB.Connection")<BR>&#039Con.Open "DSN=test"&#039<BR>&#039SET RS = Server.CreateObject("ADODB.Recordset")<BR>&#039RS.Open "Select * from EmpMaster Where Password = &#039" & a & "&#039",Con<BR>&#039msql = "UPDATE EmpMaster Set Password = &#039" & a & "&#039 where User_Name = &#039" & session("un") &"&#039"<BR>&#039Con.Execute msql<BR>&#039response.write "record updated"<BR>&#039RS.Close<BR>&#039Con.Close%>
 
Back
Top