i already succeed in creating session and to differentiate it between user...now im trying to make a user for example a customer to change their own personal information...
after they login, they can change the information by clicking on edit profile link...so how can i get their information which is stored in access database by using the session?
the code im using for the session is
- var Uname = Request.Form("nama");
-
var Upswrd = Request.Form("pass");
-
-
sql2 ="SELECT * from Login WHERE " + "Username='" + Uname + "' AND " + "UserPassword='"+ Upswrd + "'";
-
rs.Open(sql2,Conn);
-
-
if(!(rs.EOF))
-
{
-
Session("loginstatus")="OK";
-
Session("sesiUsername")=String(Uname);
-
Session("sesiUserType")=String(rs.fields.item("UserType"));
-
-
if((Session("sesiUserType"))=="admin")
-
Response.Redirect("menuAdm.asp?xx="+a+"");
-
-
if((Session("sesiUserType"))=="employee")
-
Response.Redirect("menuEmp.asp?xx="+a+"");
-
-
if((Session("sesiUserType"))=="customer")
-
Response.Redirect("menuCust.asp?xx="+a+"");
and for every other page i use this