L
Lee Steele
I have a password protected website. The site is a combination of FP and
EW. When a person logs in, the code shown below displays either "You are
not logged on" on the users id "UID" if they are logged in. I am trying to
have the users full name displayed instead of the UID. There are three
fields in the password database, UID, PWD and FullName.
<%
If Len(Session("UID")) = 0 Then
Response.Write "<b>You are not logged on.</b>"
Else
Response.Write "<b>" & Session("UID") & "</b>"
End If
%>
This is the code used on the logon page to verify UID and PWD and to save
the UID in a Session.
<%
' Was this page posted to?
If UCase(Request.ServerVariables("HTTP_METHOD")) = "POST" Then
' If so, check the username/password that was entered.
If ComparePassword(Request("UID"),Request("PWD")) Then
' If comparison was good, store the user name...
Session("UID") = Request("UID")
' ...and redirect back to the original page.
Response.Redirect Session("REFERRER")
End If
End If
%>
This is the code on each page that is password protected.
<% @language="vbscript" %>
<!--#include virtual="/_private/logon.inc"-->
This is the code I modified in an attempt to display the FullName instead of
the UID.
<%
If Len(Session("UID")) = 0 Then
Response.Write "<b>You are not logged on.</b>"
Else
Response.Write "<b>" & Session("FullName") & "</b>"
End If
%>
This is the modified code I used in an attempt to pull and store the
FullName along with the UID in a session.
<%
' Was this page posted to?
If UCase(Request.ServerVariables("HTTP_METHOD")) = "POST" Then
' If so, check the username/password that was entered.
If ComparePassword(Request("UID"),Request("PWD")) Then
' If comparison was good, store the user name...
Session("UID") = Request("UID")
Session("FullName") = Request("FullName")
' ...and redirect back to the original page.
Response.Redirect Session("REFERRER")
End If
End If
%>
The original code works perfectly. The modified code however, does log a
person in, but does not display the FullName. It does display "You are not
logged on " on the logon page.
Any advise on how to correct this problem would be greatly appreciated.
Thanks
Lee Steele
EW. When a person logs in, the code shown below displays either "You are
not logged on" on the users id "UID" if they are logged in. I am trying to
have the users full name displayed instead of the UID. There are three
fields in the password database, UID, PWD and FullName.
<%
If Len(Session("UID")) = 0 Then
Response.Write "<b>You are not logged on.</b>"
Else
Response.Write "<b>" & Session("UID") & "</b>"
End If
%>
This is the code used on the logon page to verify UID and PWD and to save
the UID in a Session.
<%
' Was this page posted to?
If UCase(Request.ServerVariables("HTTP_METHOD")) = "POST" Then
' If so, check the username/password that was entered.
If ComparePassword(Request("UID"),Request("PWD")) Then
' If comparison was good, store the user name...
Session("UID") = Request("UID")
' ...and redirect back to the original page.
Response.Redirect Session("REFERRER")
End If
End If
%>
This is the code on each page that is password protected.
<% @language="vbscript" %>
<!--#include virtual="/_private/logon.inc"-->
This is the code I modified in an attempt to display the FullName instead of
the UID.
<%
If Len(Session("UID")) = 0 Then
Response.Write "<b>You are not logged on.</b>"
Else
Response.Write "<b>" & Session("FullName") & "</b>"
End If
%>
This is the modified code I used in an attempt to pull and store the
FullName along with the UID in a session.
<%
' Was this page posted to?
If UCase(Request.ServerVariables("HTTP_METHOD")) = "POST" Then
' If so, check the username/password that was entered.
If ComparePassword(Request("UID"),Request("PWD")) Then
' If comparison was good, store the user name...
Session("UID") = Request("UID")
Session("FullName") = Request("FullName")
' ...and redirect back to the original page.
Response.Redirect Session("REFERRER")
End If
End If
%>
The original code works perfectly. The modified code however, does log a
person in, but does not display the FullName. It does display "You are not
logged on " on the logon page.
Any advise on how to correct this problem would be greatly appreciated.
Thanks
Lee Steele