

| | #1 (permalink) |
| Gold Lifetime Member Last Online: 08-03-2009 08:47 AM iTrader: (0) Join Date: Nov 2004
Posts: 91
DNF$: 219 Location: Pennsylvania, USA
Country: | Auth_user I'm trying to use Request.ServerVariables("AUTH_USER") to write the user name of the visitor on my page. The visitor had to input a username and password to gain access to the page. But the value for the auth user variable always comes up empty. What do I need to do to make this code give me the visitor's username? Code: <%
Response.Write "Hello" & Request.ServerVariables("AUTH_USER")
%>
|
| | |
| Sponsored Ads |
| | #2 (permalink) | |
| DNF Member | Re: Auth_user I'd think you'de write their username in a cookie and write the cookie to the page... Response.Write("Hello" & Request.Cookies("MyUsername")) I haven't done windows validation though, so if htat's what oyu're trying to do I guess my method would be off. Quote:
| |
| | |
| | #3 (permalink) |
| Gold Lifetime Member Last Online: 08-03-2009 08:47 AM iTrader: (0) Join Date: Nov 2004
Posts: 91
DNF$: 219 Location: Pennsylvania, USA
Country: | Re: Auth_user well I can write their name easily enough by using Code: <%
Response.Write "Hello" & Request.Form("username")
%>
Code: SELECT * from TABLE WHERE columnname = USER |
| | |
| | #4 (permalink) | |
| DNF Member | Re: Auth_user If you're not using NT validation, you're not going to get AUTH_USER as far as I know. I know the Request.Form only goes so far. THat's why I'd think once they submit that, you'de write a cookie with that value so you can look it up at any time, and pass it into a stored procedure as a paramater or use it in your ad-hoc. Does that make sense? Quote:
| |
| | |
| | #5 (permalink) |
| Gold Lifetime Member Last Online: 08-03-2009 08:47 AM iTrader: (0) Join Date: Nov 2004
Posts: 91
DNF$: 219 Location: Pennsylvania, USA
Country: | Re: Auth_user are you talking about a session ID? cause i think i tried doing that with my database filter and it didn't work Code: session("ID") = Request.Form("username")
...
SELECT * from table WHERE column = session("ID")
|
| | |
| | #6 (permalink) |
| DNF Member | Re: Auth_user No, not session. Cookie. Unless you're populating that session everytime by making them login every time, you're not going to have their username in the session. most sites write cookies. This is what I'd suggest. After they log in: Response.Cookies("Username")=Request.Form("Usernam e") Then from there on after.... SELECT * from table WHERE column = Request.Cookies("Username") |
| | |
| | #9 (permalink) |
| Gold Lifetime Member Last Online: 08-03-2009 08:47 AM iTrader: (0) Join Date: Nov 2004
Posts: 91
DNF$: 219 Location: Pennsylvania, USA
Country: | Re: Auth_user hmmm . . . problem here. Using a cookie to filter my database doesn't seem to be working. I get an ASP error message that says: Code: Microsoft JET Database Engine error '80040e14' Undefined function 'Request.Cookies' in expression. |
| | |
| | #11 (permalink) |
| Gold Lifetime Member Last Online: 08-03-2009 08:47 AM iTrader: (0) Join Date: Nov 2004
Posts: 91
DNF$: 219 Location: Pennsylvania, USA
Country: | Re: Auth_user oh good! that works. I was using Code: DB.Open "SELECT * from table WHERE column = Request.Cookies('Username')"
|
| | |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |