Wrox Programmer Forums
|
ASP Forms As of Oct 5, 2005, this forum is now locked. Please use "Classic ASP beginner" at http://p2p.wrox.com/forum.asp?FORUM_ID=54 or "Classic ASP Professional" http://p2p.wrox.com/forum.asp?FORUM_ID=56 instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP Forms section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 7th, 2004, 11:25 AM
Registered User
 
Join Date: Dec 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Login issues

I want to call the redirect to the selected page depending on the username. It is comeing from a text file I would like for the login to automatically be written in to the = ("<%login%>") but this is worn.
What i have below wokrs for only admin and anyone else who is not admin. Or I would like to be able to add a third and fourth. I don't mind hard coding the login if i have to.

if Request("login") = ("admin") then
   Response.Redirect "main.asp?action=login"
else
   Response.Redirect "client.asp?action=login"
end if

Danja Pro. We are coming .
 
Old December 13th, 2004, 02:41 AM
Registered User
 
Join Date: Dec 2004
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

U can use a select statement on the username.

Something like this -

SELECT CASE Request("login")
   CASE "admin"
       Response.Redirect "main.asp?action=login"
   CASE "USR1"
       Response.Redirect "abc.asp"
   CASE "USR2"
       Response.Redirect "xyz.asp"
END SELECT






Similar Threads
Thread Thread Starter Forum Replies Last Post
connection string issues, web.config file issues kaliaparijat ASP.NET 2.0 Professional 1 June 12th, 2008 08:07 AM
Chapter 16 Login/Logout Issues tenjinspen BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 2 June 12th, 2008 04:11 AM
vb6 .exe login issues Jade08 Beginning VB 6 8 May 7th, 2008 08:10 AM
login failed for user nt authority\anonymous login rj1406 Classic ASP Databases 1 October 24th, 2004 09:15 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.