Click here to Skip to main content
15,913,055 members
Home / Discussions / Web Development
   

Web Development

 
AnswerRe: HOW TO: get handle to opened window? Pin
alex.barylski12-Jan-04 23:23
alex.barylski12-Jan-04 23:23 
AnswerRe: HOW TO: get handle to opened window? Pin
l a u r e n14-Jan-04 13:06
l a u r e n14-Jan-04 13:06 
QuestionHow can create smtp and pop3 protocol? Pin
Member 79630511-Jan-04 22:48
Member 79630511-Jan-04 22:48 
AnswerRe: How can create smtp and pop3 protocol? Pin
alex.barylski12-Jan-04 23:34
alex.barylski12-Jan-04 23:34 
AnswerRe: How can create smtp and pop3 protocol? Pin
l a u r e n14-Jan-04 13:08
l a u r e n14-Jan-04 13:08 
QuestionHow to access Remote Database Pin
tmhai11-Jan-04 22:45
tmhai11-Jan-04 22:45 
AnswerRe: How to access Remote Database Pin
l a u r e n14-Jan-04 13:10
l a u r e n14-Jan-04 13:10 
GeneralHTTP_REFERER Does not want to work Pin
Brendan Vogt11-Jan-04 21:48
Brendan Vogt11-Jan-04 21:48 
:-DA user has to log on to my website. If he requests a page and is not logged on, then he is directed to the logon page. Once logged he should be redirected to page that he/she originally requested. As far is what I can understand is the I have to use Request.ServerVariables("HTTP_REFERER"). The value is not passed through, it comes through blank. I have debugged it many times, still no luck. Is this something that must be set on IIS? Can some please help? And then secondly, is there any way that I can increase the security of my login code? Any help will be appreciated!!!

Here is my calling page:

<%@ LANGUAGE=VBScript ENABLESESSIONSTATE=True %>


<%

If IsEmpty(Session("username")) Then
Response.Redirect "login.asp"
End If

%>

Here is my ASP code on my login page:

<%@ LANGUAGE=VBScript ENABLESESSIONSTATE=True %>


<%


'-----------------------------------------------------------------------------
' Declare variables
'-----------------------------------------------------------------------------
Dim objConn, objRs
Dim strSQL
Dim boolIsPost
Dim strUserName, strPassword
Dim strErrorTitle, strError, boolHasError

'-----------------------------------------------------------------------------
' Setup the response object
'-----------------------------------------------------------------------------
Call SetupResponse()

'-----------------------------------------------------------------------------
' Open database connection
'-----------------------------------------------------------------------------
Set objConn = GetDBConnection()

'-----------------------------------------------------------------------------
' Determine whether form was posted
'-----------------------------------------------------------------------------
boolIsPost = CBool(Request.Form("IsPost"))

If boolIsPost Then

' Get username and password
strUserName = Request.Form("username")
strPassword = Request.Form("password")

If Len(strUserName) < 8 Or Len(strUserName) > 30 Then
boolHasError = True
ElseIf Len(strPassword) < 8 Or Len(strPassword) > 30 Then
boolHasError = True
Else ' If all is ok

Set objRs = Server.CreateObject("ADODB.Recordset")
strSQL = "SELECT User_Username FROM tblUser WHERE User_Username = '" & strUserName & "' " & _
"AND User_Password = '" & strPassword & "'"
objRs.Open strSQL ,objConn, adOpenKeyset, adLockOptimistic
' If no match was found
If objRs.EOF Then
boolHasError = True
Else
' Set the Session variables
Session("username") = strUserName
' Redirect to original page
Response.Redirect Request.ServerVariables("HTTP_REFERER")
'Response.Redirect "default.asp"
End If

' Close and release resources
objRs.Close
Set objRs = Nothing
End If

End If

%>



...Rest of HTML Code goes here...
GeneralRe: HTTP_REFERER Does not want to work Pin
Marcie Jones12-Jan-04 7:57
Marcie Jones12-Jan-04 7:57 
GeneralRe: HTTP_REFERER Does not want to work Pin
Danoo12-Jan-04 23:42
Danoo12-Jan-04 23:42 
GeneralRe: HTTP_REFERER Does not want to work Pin
Brendan Vogt13-Jan-04 23:31
Brendan Vogt13-Jan-04 23:31 
GeneralRe: HTTP_REFERER Does not want to work Pin
l a u r e n14-Jan-04 13:15
l a u r e n14-Jan-04 13:15 
GeneralRe: HTTP_REFERER Does not want to work Pin
Anonymous15-Jan-04 2:20
Anonymous15-Jan-04 2:20 
GeneralRe: HTTP_REFERER Does not want to work Pin
l a u r e n15-Jan-04 5:24
l a u r e n15-Jan-04 5:24 
GeneralRe: HTTP_REFERER Does not want to work Pin
Brendan Vogt15-Jan-04 2:25
Brendan Vogt15-Jan-04 2:25 
GeneralASP User Impersonation Pin
Member 81243911-Jan-04 3:02
Member 81243911-Jan-04 3:02 
Generaljavascript question... Pin
l a u r e n9-Jan-04 20:49
l a u r e n9-Jan-04 20:49 
GeneralRe: javascript question... Pin
Paul Watson10-Jan-04 2:27
sitebuilderPaul Watson10-Jan-04 2:27 
GeneralRe: javascript question... Pin
l a u r e n10-Jan-04 5:45
l a u r e n10-Jan-04 5:45 
GeneralRe: javascript question... Pin
Maximilien11-Jan-04 9:40
Maximilien11-Jan-04 9:40 
GeneralRe: javascript question... Pin
l a u r e n11-Jan-04 12:28
l a u r e n11-Jan-04 12:28 
GeneralRe: javascript question... Pin
alex.barylski11-Jan-04 17:54
alex.barylski11-Jan-04 17:54 
GeneralRe: javascript question... Pin
l a u r e n11-Jan-04 18:11
l a u r e n11-Jan-04 18:11 
Generala better use of css Pin
Nathan Ridley12-Jan-04 15:44
Nathan Ridley12-Jan-04 15:44 
GeneralRe: a better use of css Pin
l a u r e n5-Feb-04 13:44
l a u r e n5-Feb-04 13:44 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.