phillip_ewing
01-21-2003, 08:09 PM
I have three types of users coming into my database:
1 - admin
2 - teachers
3 - students/parents
and I am trying to differentiate the difference in them. Right now, when a user logs in, they are either admin or everybody else. Can you add another 'else' statement and if so, can someone please show me how? Below is the code I am using. I appreciate all of those who help me.
<%
'Check if user is logged in
if Session("name") = "Admin" then
'If not, go to login page
Response.Write("<title>" & Session("fullname") & "'s ASP Page</title>")
Response.write("Welcome " & "<br>User Name: " & Session("name") & "<br>Password: " & Session("password") & "<br><br><a href=default1.asp>Inventory Database<br>")
else
'If, build page
Response.Write("<title>" & Session("fullname") & "'s ASP Page</title>")
Response.write("Welcome " & "<br>User Name: " & Session("name") & "<br>Password: " & Session("password") & "<br><br><a href=default2.asp>Inventory Database<br>")
end if
%>
If you have any further questions, feel free to contact me either thru this forum or thru e-mail. Thank you again.
1 - admin
2 - teachers
3 - students/parents
and I am trying to differentiate the difference in them. Right now, when a user logs in, they are either admin or everybody else. Can you add another 'else' statement and if so, can someone please show me how? Below is the code I am using. I appreciate all of those who help me.
<%
'Check if user is logged in
if Session("name") = "Admin" then
'If not, go to login page
Response.Write("<title>" & Session("fullname") & "'s ASP Page</title>")
Response.write("Welcome " & "<br>User Name: " & Session("name") & "<br>Password: " & Session("password") & "<br><br><a href=default1.asp>Inventory Database<br>")
else
'If, build page
Response.Write("<title>" & Session("fullname") & "'s ASP Page</title>")
Response.write("Welcome " & "<br>User Name: " & Session("name") & "<br>Password: " & Session("password") & "<br><br><a href=default2.asp>Inventory Database<br>")
end if
%>
If you have any further questions, feel free to contact me either thru this forum or thru e-mail. Thank you again.