954,206 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

form post error

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

geeta40
Newbie Poster
2 posts since Jun 2007
Reputation Points: 10
Solved Threads: 0
 

I am sorry seems not able to work out the code tags

geeta40
Newbie Poster
2 posts since Jun 2007
Reputation Points: 10
Solved Threads: 0
 

did u get it or not yet.. ??

smart_saru
Newbie Poster
12 posts since Sep 2007
Reputation Points: 10
Solved Threads: 0
 

if u havent still got it.. message me on [email]smart_saru@hotmail.com[/email]
=======================
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

smart_saru
Newbie Poster
12 posts since Sep 2007
Reputation Points: 10
Solved Threads: 0
 

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.

fatihpiristine
Posting Whiz in Training
283 posts since Sep 2007
Reputation Points: 6
Solved Threads: 19
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You