Hi
New to ASP

auth_in.asp

If (Mgr_Access = TRUE) And (Adv_Access = TRUE) Then
		
			%>
				<!-- #include file = "login_option.asp" -->
			<%
END if

login.asp

<!-- MAIN BODY -->
					
						<p><b>Choose your Login Option</b></p>
						<form method="post" action="">
						<input TYPE="radio" NAME="Login" VALUE="MG" CHECKED>Manager
						<input TYPE="radio" NAME="Login" VALUE="AD">Advisor
						</br>
						</br><input type="submit" value="Submit">
						</form>
						
					<%
					
						
						IF Log = "MG" Then
							
							Session("sessNtID") = NtID
		
							'set user's access level
							access_level = rsData("access_level")
							Session("sessAccess_level") = access_level
							
							'set user's ID number
							user_id = rsData("user_id") 
							Session("sessUser_id") = user_id
												
						ElseIf Log ="AD" Then
							
							Session("sessNtID") = NtID
		
							'set user's access level
							access_level = asData("access_level")
							Session("sessAccess_level") = access_level
							
							'set user's ID number
							user_id = asData("user_id") 
							Session("sessUser_id") = user_id
							
						End If
						
					%>
			
					<!-- MAIN BODY END -->

The code is working fine but the user has to click the submit button twice for the form to work

Couldnt figure out where the problem is

if u havent still got it.. message me on smart_saru@hotmail.com
=======================

Hi
New to ASP

auth_in.asp

If (Mgr_Access = TRUE) And (Adv_Access = TRUE) Then
		
			%>
				<!-- #include file = "login_option.asp" -->
			<%
END if

login.asp

<!-- MAIN BODY -->
					
						<p><b>Choose your Login Option</b></p>
						<form method="post" action="">
						<input TYPE="radio" NAME="Login" VALUE="MG" CHECKED>Manager
						<input TYPE="radio" NAME="Login" VALUE="AD">Advisor
						</br>
						</br><input type="submit" value="Submit">
						</form>
						
					<%
					
						
						IF Log = "MG" Then
							
							Session("sessNtID") = NtID
		
							'set user's access level
							access_level = rsData("access_level")
							Session("sessAccess_level") = access_level
							
							'set user's ID number
							user_id = rsData("user_id") 
							Session("sessUser_id") = user_id
												
						ElseIf Log ="AD" Then
							
							Session("sessNtID") = NtID
		
							'set user's access level
							access_level = asData("access_level")
							Session("sessAccess_level") = access_level
							
							'set user's ID number
							user_id = asData("user_id") 
							Session("sessUser_id") = user_id
							
						End If
						
					%>
			
					<!-- MAIN BODY END -->

The code is working fine but the user has to click the submit button twice for the form to work

Couldnt figure out where the problem is

add a new coloumn (e.g: level ) in your table and set management levels for users like :

1 => Administratros
2 => Users

then create your sql query which includes only
userid and level...

then catch the level and redirect the page that the user has to browse.

This article has been dead for over six months. Start a new discussion instead.