form post error

Reply

Join Date: Jun 2007
Posts: 2
Reputation: geeta40 is an unknown quantity at this point 
Solved Threads: 0
geeta40 geeta40 is offline Offline
Newbie Poster

form post error

 
0
  #1
Jun 15th, 2007
Hi
New to ASP

auth_in.asp
  1. If (Mgr_Access = TRUE) And (Adv_Access = TRUE) Then
  2.  
  3. %>
  4. <!-- #include file = "login_option.asp" -->
  5. <%
  6. END if
login.asp
  1. <!-- MAIN BODY -->
  2.  
  3. <p><b>Choose your Login Option</b></p>
  4. <form method="post" action="">
  5. <input TYPE="radio" NAME="Login" VALUE="MG" CHECKED>Manager
  6. <input TYPE="radio" NAME="Login" VALUE="AD">Advisor
  7. </br>
  8. </br><input type="submit" value="Submit">
  9. </form>
  10.  
  11. <%
  12.  
  13.  
  14. IF Log = "MG" Then
  15.  
  16. Session("sessNtID") = NtID
  17.  
  18. 'set user's access level
  19. access_level = rsData("access_level")
  20. Session("sessAccess_level") = access_level
  21.  
  22. 'set user's ID number
  23. user_id = rsData("user_id")
  24. Session("sessUser_id") = user_id
  25.  
  26. ElseIf Log ="AD" Then
  27.  
  28. Session("sessNtID") = NtID
  29.  
  30. 'set user's access level
  31. access_level = asData("access_level")
  32. Session("sessAccess_level") = access_level
  33.  
  34. 'set user's ID number
  35. user_id = asData("user_id")
  36. Session("sessUser_id") = user_id
  37.  
  38. End If
  39.  
  40. %>
  41.  
  42. <!-- 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
Reply With Quote Quick reply to this message  
Join Date: Jun 2007
Posts: 2
Reputation: geeta40 is an unknown quantity at this point 
Solved Threads: 0
geeta40 geeta40 is offline Offline
Newbie Poster

Re: form post error

 
0
  #2
Jun 15th, 2007
I am sorry seems not able to work out the code tags
Last edited by geeta40; Jun 15th, 2007 at 4:57 pm.
Reply With Quote Quick reply to this message  
Join Date: Sep 2007
Posts: 12
Reputation: smart_saru is an unknown quantity at this point 
Solved Threads: 0
smart_saru smart_saru is offline Offline
Newbie Poster

Re: form post error

 
0
  #3
Sep 4th, 2007
did u get it or not yet.. ??
Reply With Quote Quick reply to this message  
Join Date: Sep 2007
Posts: 12
Reputation: smart_saru is an unknown quantity at this point 
Solved Threads: 0
smart_saru smart_saru is offline Offline
Newbie Poster

Re: form post error

 
0
  #4
Sep 26th, 2007
if u havent still got it.. message me on smart_saru@hotmail.com
=======================
Originally Posted by geeta40 View Post
Hi
New to ASP

auth_in.asp
  1. If (Mgr_Access = TRUE) And (Adv_Access = TRUE) Then
  2.  
  3. %>
  4. <!-- #include file = "login_option.asp" -->
  5. <%
  6. END if
login.asp
  1. <!-- MAIN BODY -->
  2.  
  3. <p><b>Choose your Login Option</b></p>
  4. <form method="post" action="">
  5. <input TYPE="radio" NAME="Login" VALUE="MG" CHECKED>Manager
  6. <input TYPE="radio" NAME="Login" VALUE="AD">Advisor
  7. </br>
  8. </br><input type="submit" value="Submit">
  9. </form>
  10.  
  11. <%
  12.  
  13.  
  14. IF Log = "MG" Then
  15.  
  16. Session("sessNtID") = NtID
  17.  
  18. 'set user's access level
  19. access_level = rsData("access_level")
  20. Session("sessAccess_level") = access_level
  21.  
  22. 'set user's ID number
  23. user_id = rsData("user_id")
  24. Session("sessUser_id") = user_id
  25.  
  26. ElseIf Log ="AD" Then
  27.  
  28. Session("sessNtID") = NtID
  29.  
  30. 'set user's access level
  31. access_level = asData("access_level")
  32. Session("sessAccess_level") = access_level
  33.  
  34. 'set user's ID number
  35. user_id = asData("user_id")
  36. Session("sessUser_id") = user_id
  37.  
  38. End If
  39.  
  40. %>
  41.  
  42. <!-- 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
Reply With Quote Quick reply to this message  
Join Date: Sep 2007
Posts: 271
Reputation: fatihpiristine has a little shameless behaviour in the past 
Solved Threads: 16
fatihpiristine's Avatar
fatihpiristine fatihpiristine is offline Offline
Posting Whiz in Training

Re: form post error

 
0
  #5
Sep 26th, 2007
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.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the ASP Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC