Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting Logged on user name... 1

Status
Not open for further replies.

WhiteTiger

Programmer
Jun 26, 2001
605
US
How can I get a username and use it to check if a person should go to 1 page or another and redirect them accordingly?

I need to check multiple user names Regards,
Anth:cool:ny
----------------------------------------
"You say [red]insanity[/red] like it's a BAD THING!"
 
I'm trying to get the logged on users name off of the network...all intranet stuff...

I've looked at cookies, but still haven't find out...
and SHEESH vituz, U have a database you can just search real quick and it brings up a list of relavant links or what?...lol Regards,
Anth:cool:ny
----------------------------------------
"You say [red]insanity[/red] like it's a BAD THING!"
 
and if your anything like old...dont say 'it's called a search engine' - or - 'yea, yahoo.com'...LOL Regards,
Anth:cool:ny
----------------------------------------
"You say [red]insanity[/red] like it's a BAD THING!"
 
The following will get you a username in asp:

Request.ServerVariables("LOGON_USER")

Then you can build your logic to handle the redirection. If you don't have a lot of users then a simple select case statement would work. Or if the list is extensive, then perhaps a database with a list of usernames and places they are authorized to go.

hope this helps! Tazzmann
 
Why thank you tazzman!...finally someone besides vituz is helping me...lol...

Now I can set up our administration page...HAHAHA!
(I love having so much power.) Regards,
Anth:cool:ny
----------------------------------------
"You say [red]insanity[/red] like it's a BAD THING!"
 
Now I'm having a problem with the request part...

it keeps saying request is undefined. Regards,
Anth:cool:ny
----------------------------------------
"You say [red]insanity[/red] like it's a BAD THING!"
 
nevermind, I got it...it wasn't javascript!...lol

basically I put
Code:
 <%=Request.ServerVariables(&quot;LOGON_USER&quot;)%>
Regards,
Anth:cool:ny
----------------------------------------
&quot;You say [red]insanity[/red] like it's a BAD THING!&quot;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top