Welcome smo
If session variable is not present then we will display a login window or show a link to login page like his
Userid
Password
We will be using one if condition in ASP to check the session and display the welcome message if userid is present , else we will show the login form. Here is the code to do this
<% if (IsEmpty(Session("userid"))) then %>
<form method=post action=loginck.asp>
<table border="0" cellspacing="0" cellpadding="0" align=center>
<tr><td>User Id </td><td><input type=text name=userid></tr>
<tr><td>Password</td><td><input type=password name=password></tr>
<tr><td colspan=2 align=center><input type=submit value=Login></td></tr>
</table>
<%
else
Response.Write " Welcome " & Session("userid") & " <a href=logout.asp>Click here to log out</a>"
End if
%>
You can read similar script on login session management in php here