944,217 Members | Top Members by Rank

Ad:
  • ASP Discussion Thread
  • Unsolved
  • Views: 2307
  • ASP RSS
Jun 15th, 2007
0

form post error

Expand Post »
Hi
New to ASP

auth_in.asp
ASP Syntax (Toggle Plain Text)
  1. If (Mgr_Access = TRUE) And (Adv_Access = TRUE) Then
  2.  
  3. %>
  4. <!-- #include file = "login_option.asp" -->
  5. <%
  6. END if
login.asp
ASP Syntax (Toggle Plain Text)
  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
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
geeta40 is offline Offline
2 posts
since Jun 2007
Jun 15th, 2007
0

Re: form post error

I am sorry seems not able to work out the code tags
Last edited by geeta40; Jun 15th, 2007 at 4:57 pm.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
geeta40 is offline Offline
2 posts
since Jun 2007
Sep 4th, 2007
0

Re: form post error

did u get it or not yet.. ??
Reputation Points: 10
Solved Threads: 0
Newbie Poster
smart_saru is offline Offline
12 posts
since Sep 2007
Sep 26th, 2007
0

Re: form post error

if u havent still got it.. message me on smart_saru@hotmail.com
=======================
Click to Expand / Collapse  Quote originally posted by geeta40 ...
Hi
New to ASP

auth_in.asp
ASP Syntax (Toggle Plain Text)
  1. If (Mgr_Access = TRUE) And (Adv_Access = TRUE) Then
  2.  
  3. %>
  4. <!-- #include file = "login_option.asp" -->
  5. <%
  6. END if
login.asp
ASP Syntax (Toggle Plain Text)
  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
Reputation Points: 10
Solved Threads: 0
Newbie Poster
smart_saru is offline Offline
12 posts
since Sep 2007
Sep 26th, 2007
0

Re: form post error

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.
Reputation Points: 6
Solved Threads: 19
Posting Whiz in Training
fatihpiristine is offline Offline
283 posts
since Sep 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in ASP Forum Timeline: nehashri
Next Thread in ASP Forum Timeline: pleaaaaaaaaaase help me ,ASP exam





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC