CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 UserRight

Print topic Send  topic

Author Message
Paul
Posted: 03/22/2002, 7:44 AM

I am using MySQL with ASP and want each user to have a security code based upon certain criteria, then for the user to be redirected to an appropriate admin page. I have started to construct this but have fallen at the first hurdle, i have a column in my database called UserRights, i have checked this as being the field i want as my security in Properties->Security->Security Field, then i have used the code below to redirect... as seen in Article:

if Session("UserRights")=1 then response.redirect("AdminEducationGrid.asp") else
if Session("UserRights")=2 then response.redirect("AdminSalesGrid.asp") else
if Session("UserRights")=3 then response.redirect("AdminExecutiveGrid.asp")else response.redirect("Stubby.asp")

However I just can't seem to get it to redirect... with me always ending up at the stubby.asp page....

Any ideas? Thanks in advance....
Ken Hardwick
Posted: 03/22/2002, 10:05 AM

Have you tried to convert the session variable to a number...

You might try something like...

cntRedirect = cint(Session("UserRights"))*1

Select case Redirect
Case 1,"1"
strRedirect = "AdminEducationGrid.asp"
Case 2,"2"
strRedirect = "AdminSalesGrid.asp"
Case 3,"3"
strRedirect = "AdminExecutiveGrid.asp"
Case Else
strRedirect = "Stubby.asp"
end select

response.redirect(strRedirect)








   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.