Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Password protect a page

Posted on 2014-01-07
24
Medium Priority
?
456 Views
Last Modified: 2014-01-10
I need a password for an asp page. The code is attached and is working but I need to enter a message so if an incorrect password is entered, a message appears. I can't seem to find the correct else if statement to include.
Test.txt
0
Comment
Question by:Malloy1446
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 12
  • 10
  • 2
24 Comments
 
LVL 54

Expert Comment

by:Scott Fell, EE MVE
ID: 39763753
I wouldn't let the page or the db run unless verified

<!-- #Include Virtual="VALNET/CodeReuse/Chart2.inc" -->



<!--Password code -->
<%
If session("access") = "" then
	If request.form("password") = "password" then
		Session("access") = "verified"
	end if
end if
if session("access")<>"verified" then
	response.redirect("not_verified.asp")
end if





dim title
title = "Password Protect a Page"


'Create recordset
 Dim sql, objRS


 sql = "SELECT tblGeneral.ChartID, tblGeneral.City, tblGeneral.State " & _
	"FROM tblGeneral "

 		If Request.querystring("sort") = "" then
 			sql = sql & "ORDER BY City"
 		Else
  			sql = sql & "ORDER BY " & Request.querystring("sort")
  		End If			

	Set objRS = Server.CreateObject("ADODB.Recordset")
	objRS.Open sql, objConn

%>



<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 12.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title><%=title%></title>


</head>

<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function formHandler(){
var URL = document.form.site.options[document.form.site.selectedIndex].value;
window.location.href = URL;
// End -->
}
</SCRIPT>

<body>




<!--the body tag has the additional onload code added -->
<body onload="passform.password.focus();">

	<form name="passform" method="POST" action="Test.asp">
  		<p>Password:&nbsp; 
  		<input type="text" name="password" size="20">
  		<input type="submit" value="Submit" name="B3"></p>
	</form>



<%	


'-------------------------------------------------------------------



%>
<h2><%=title%></h2>


<%

    do until objRS.eof
  	Response.write objRS("City") & "<p>" & VbCrLf
        
    objRS.movenext
	loop





%>


            
</body>

</html>

Open in new window

0
 
LVL 54

Expert Comment

by:Scott Fell, EE MVE
ID: 39763758
I would also place the password verification code in a separate file and simply include it on all pages that need a password. That way if you need to change the code, you change it in one spot.

<!--Password code -->
<!-- #Include Virtual="/password_verify.asp" -->
<!-- #Include Virtual="VALNET/CodeReuse/Chart2.inc" -->

<%
I





dim title
title = "Password Protect a Page"


'Create recordset
 Dim sql, objRS


 sql = "SELECT tblGeneral.ChartID, tblGeneral.City, tblGeneral.State " & _
	"FROM tblGeneral "

 		If Request.querystring("sort") = "" then
 			sql = sql & "ORDER BY City"
 		Else
  			sql = sql & "ORDER BY " & Request.querystring("sort")
  		End If			

	Set objRS = Server.CreateObject("ADODB.Recordset")
	objRS.Open sql, objConn

%>



<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 12.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title><%=title%></title>


</head>

<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function formHandler(){
var URL = document.form.site.options[document.form.site.selectedIndex].value;
window.location.href = URL;
// End -->
}
</SCRIPT>

<body>




<!--the body tag has the additional onload code added -->
<body onload="passform.password.focus();">

	<form name="passform" method="POST" action="Test.asp">
  		<p>Password:&nbsp; 
  		<input type="text" name="password" size="20">
  		<input type="submit" value="Submit" name="B3"></p>
	</form>



<%	


'-------------------------------------------------------------------



%>
<h2><%=title%></h2>


<%

    do until objRS.eof
  	Response.write objRS("City") & "<p>" & VbCrLf
        
    objRS.movenext
	loop





%>


            
</body>

</html>

Open in new window

0
 
LVL 58

Expert Comment

by:Gary
ID: 39763766
My take

<!--Password code -->
<%
If session("access") = "" then
	If request.form("password") = "password" then
		Session("access") = "verified"
	Else
if request.form("password")<>"" then errormess="Wrong password"
%>

<!--the body tag has the additional onload code added -->
<body onload="passform.password.focus();">

	<form name="passform" method="POST" action="Test.asp">
		<p><%=errormess%></p>
  		<p>Password:&nbsp; 
  		<input type="text" name="password" size="20">
  		<input type="submit" value="Submit" name="B3"></p>
	</form>



<%	End If
End If

Open in new window

0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

Author Comment

by:Malloy1446
ID: 39763956
To Scott Fell:

I tried your solution and what happens is the page goes automatically to the REDIRECT page without giving you the option to enter a password.

I do like the idea of making the password code a separate file. I will do that once I get the code to work.
0
 
LVL 54

Expert Comment

by:Scott Fell, EE MVE
ID: 39763976
If it is for just one page, then I would place your test below the body tag.  

<!-- #Include Virtual="VALNET/CodeReuse/Chart2.inc" -->

<%
dim title
title = "Password Protect a Page"
If session("access") = "" then
	If request.form("password") = "password" then
		Session("access") = "verified"
	end if
end if


if Session("access") = "verified" then
' only access the db if verified



'Create recordset
 Dim sql, objRS


 sql = "SELECT tblGeneral.ChartID, tblGeneral.City, tblGeneral.State " & _
	"FROM tblGeneral "

 		If Request.querystring("sort") = "" then
 			sql = sql & "ORDER BY City"
 		Else
  			sql = sql & "ORDER BY " & Request.querystring("sort")
  		End If			

	Set objRS = Server.CreateObject("ADODB.Recordset")
	objRS.Open sql, objConn
end if
%>



<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 12.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title><%=title%></title>


</head>

<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function formHandler(){
var URL = document.form.site.options[document.form.site.selectedIndex].value;
window.location.href = URL;
// End -->
}
</SCRIPT>

<body>




<!--the body tag has the additional onload code added -->
<body onload="passform.password.focus();">




<%	

'-------------------------------------------------------------------
'If session is verified display the report
If session("access") = "verified" then


%>
<h2><%=title%></h2>


<%

    do until objRS.eof
  	Response.write objRS("City") & "<p>" & VbCrLf
        
    objRS.movenext
	loop

Else
%>

	<form name="passform" method="POST" action="Test.asp">
  		<p>Password:&nbsp; 
  		<input type="text" name="password" size="20">
  		<input type="submit" value="Submit" name="B3"></p>
	</form>
<%
End if



%>


            
</body>

</html>

Open in new window

0
 
LVL 54

Expert Comment

by:Scott Fell, EE MVE
ID: 39763977
With include
<!-- #Include Virtual="VALNET/CodeReuse/Chart2.inc" -->
<!-- #Include Virtual="/password_check.asp" -->
<%
dim title
title = "Password Protect a Page"



if Session("access") = "verified" then
' only access the db if verified



'Create recordset
 Dim sql, objRS


 sql = "SELECT tblGeneral.ChartID, tblGeneral.City, tblGeneral.State " & _
	"FROM tblGeneral "

 		If Request.querystring("sort") = "" then
 			sql = sql & "ORDER BY City"
 		Else
  			sql = sql & "ORDER BY " & Request.querystring("sort")
  		End If			

	Set objRS = Server.CreateObject("ADODB.Recordset")
	objRS.Open sql, objConn
end if
%>



<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 12.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title><%=title%></title>


</head>

<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function formHandler(){
var URL = document.form.site.options[document.form.site.selectedIndex].value;
window.location.href = URL;
// End -->
}
</SCRIPT>

<body>




<!--the body tag has the additional onload code added -->
<body onload="passform.password.focus();">




<%	

'-------------------------------------------------------------------
'If session is verified display the report
If session("access") = "verified" then


%>
<h2><%=title%></h2>


<%

    do until objRS.eof
  	Response.write objRS("City") & "<p>" & VbCrLf
        
    objRS.movenext
	loop

Else
%>

	<form name="passform" method="POST" action="Test.asp">
  		<p>Password:&nbsp; 
  		<input type="text" name="password" size="20">
  		<input type="submit" value="Submit" name="B3"></p>
	</form>
<%
End if



%>


            
</body>

</html>

Open in new window

0
 

Author Comment

by:Malloy1446
ID: 39763994
The verification test is working correctly, but I still cannot display a message if an incorrect password is entered.  I like the idea of the inc file with a redirect page. I have about 6 reports that I will need to use this  verification.
0
 
LVL 58

Expert Comment

by:Gary
ID: 39763997
Did you try my code?
0
 

Author Comment

by:Malloy1446
ID: 39764010
My inc file:

<%
If session("access") = "" then
      If request.form("password") = "password" then
            Session("access") = "verified"
      end if
end if

If session("access")<>"verified" then
      response.redirect("No_Access.asp")
end if

%>


My code is attached (copied from your response above)
Test3.txt
0
 
LVL 54

Expert Comment

by:Scott Fell, EE MVE
ID: 39764016
I added a lock out feature you can play with if too many tries are made logging in

<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>

<%
dim title
title = "Password Protect a Page"

msg=""

If session("access") = "" then
	If request.form("password") = "password" then
		Session("access") = "verified"
		session("trys")=0
		else
		
		if session("trys")="" then
			session("trys")=1
			else
			session("trys")=cdbl(session("trys"))+1
		end if
		msg="Please type in a good password"
	end if
end if
if cdbl(session("trys"))>=4 then
   msg="You are locked out for 15 minutes"
end if

if Session("access") = "verified" then
' only access the db if verified



'Create recordset
 Dim sql, objRS


 sql = "SELECT tblGeneral.ChartID, tblGeneral.City, tblGeneral.State " & _
	"FROM tblGeneral "

 		If Request.querystring("sort") = "" then
 			sql = sql & "ORDER BY City"
 		Else
  			sql = sql & "ORDER BY " & Request.querystring("sort")
  		End If			

	Set objRS = Server.CreateObject("ADODB.Recordset")
	objRS.Open sql, objConn
end if


%>



<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 12.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title><%=title%></title>

<style>
.msg{background-color:pink;padding:20px;}
</style>
</head>

<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function formHandler(){
var URL = document.form.site.options[document.form.site.selectedIndex].value;
window.location.href = URL;
// End -->
}
</SCRIPT>

<body>




<!--the body tag has the additional onload code added -->
<body onload="passform.password.focus();">

<% if msg<>"" then%>
<div class="msg"><%=msg%></div>
<%end if%>

<%	

'-------------------------------------------------------------------
'If session is verified display the report
If session("access") = "verified" then


%>
<h2><%=title%></h2>


<%

    do until objRS.eof
  	Response.write objRS("City") & "<p>" & VbCrLf
        
    objRS.movenext
	loop

response.write "you are in "
Else
if cdbl(session("trys")) < 4 then
%>

	<form name="passform" method="POST" action="Test.asp">
  		<p>Password:&nbsp; 
  		<input type="text" name="password" size="20">
  		<input type="submit" value="Submit" name="B3"></p>
	</form>
<%
end if

End if



%>


            
</body>

</html>

Open in new window

0
 
LVL 54

Expert Comment

by:Scott Fell, EE MVE
ID: 39764027
I would not suggest using an include file with .inc

Instead of

<!-- #Include Virtual="VALNET/CodeReuse/Mentor_Verify2.inc" -->

use

<!-- #Include Virtual="VALNET/CodeReuse/Mentor_Verify2.asp" -->

More then likely if somebody surfed to yoursite.com/VALNET/CodeReuse/Mentor_Verify2.inc the server would not render anything between the asp tags <% %> but to me it just seem safer to use .asp just in case.
0
 
LVL 54

Expert Comment

by:Scott Fell, EE MVE
ID: 39764031
I don't think you need the javascript

<body onload="passform.password.focus();">

The last sample uses server side code.  

 cathal knows js better then I do.  Maybe he can help with that part.
0
 

Author Comment

by:Malloy1446
ID: 39764046
I do not want the lock-out. I need to delete this.
0
 
LVL 54

Expert Comment

by:Scott Fell, EE MVE
ID: 39764048
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<%
' include file'
If session("access") = "" then
      If request.form("password") = "password" then
            Session("access") = "verified"
      end if
end if

If session("access")<>"verified" then
      response.redirect("No_Access.asp")
end if
' end include file'
%>

<%
dim title
title = "Password Protect a Page"

msg=""




if Session("access") = "verified" then
' only access the db if verified



'Create recordset
 Dim sql, objRS


 sql = "SELECT tblGeneral.ChartID, tblGeneral.City, tblGeneral.State " & _
	"FROM tblGeneral "

 		If Request.querystring("sort") = "" then
 			sql = sql & "ORDER BY City"
 		Else
  			sql = sql & "ORDER BY " & Request.querystring("sort")
  		End If			

	Set objRS = Server.CreateObject("ADODB.Recordset")
	objRS.Open sql, objConn
end if


%>



<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 12.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title><%=title%></title>

<style>
.msg{background-color:pink;padding:20px;}
</style>
</head>

<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function formHandler(){
var URL = document.form.site.options[document.form.site.selectedIndex].value;
window.location.href = URL;
// End -->
}
</SCRIPT>

<body>




<!--the body tag has the additional onload code added -->
<body onload="passform.password.focus();">

<% if msg<>"" then%>
<div class="msg"><%=msg%></div>
<%end if%>

<%	

'-------------------------------------------------------------------
'If session is verified display the report
If session("access") = "verified" then


%>
<h2><%=title%></h2>


<%

    do until objRS.eof
  	Response.write objRS("City") & "<p>" & VbCrLf
        
    objRS.movenext
	loop

response.write "you are in "
Else

%>

	<form name="passform" method="POST" action="Test.asp">
  		<p>Password:&nbsp; 
  		<input type="text" name="password" size="20">
  		<input type="submit" value="Submit" name="B3"></p>
	</form>
<%


End if



%>


            
</body>

</html>

Open in new window

0
 

Author Comment

by:Malloy1446
ID: 39764050
OK, now I am really confused. In your code above, it appears the password code is already imbedded so I wouldn't need an include file, correct?

I would prefer to have code with the verify code in an include file with no lockout.
0
 
LVL 54

Expert Comment

by:Scott Fell, EE MVE
ID: 39764104
I took out the lock out.  Just replace the password code with your include.

<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!-- #Include Virtual="VALNET/CodeReuse/ConnComparisonChart2.inc" -->
<!-- #Include Virtual="VALNET/CodeReuse/Mentor_Verify2.asp" -->
<%
dim title
title = "Password Protect a Page"

msg=""




if Session("access") = "verified" then
' only access the db if verified



'Create recordset
 Dim sql, objRS


 sql = "SELECT tblGeneral.ChartID, tblGeneral.City, tblGeneral.State " & _
	"FROM tblGeneral "

 		If Request.querystring("sort") = "" then
 			sql = sql & "ORDER BY City"
 		Else
  			sql = sql & "ORDER BY " & Request.querystring("sort")
  		End If			

	Set objRS = Server.CreateObject("ADODB.Recordset")
	objRS.Open sql, objConn
end if


%>



<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 12.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title><%=title%></title>

<style>
.msg{background-color:pink;padding:20px;}
</style>
</head>

<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function formHandler(){
var URL = document.form.site.options[document.form.site.selectedIndex].value;
window.location.href = URL;
// End -->
}
</SCRIPT>

<body>




<!--the body tag has the additional onload code added -->
<body onload="passform.password.focus();">

<% if msg<>"" then%>
<div class="msg"><%=msg%></div>
<%end if%>

<%	

'-------------------------------------------------------------------
'If session is verified display the report
If session("access") = "verified" then


%>
<h2><%=title%></h2>


<%

    do until objRS.eof
  	Response.write objRS("City") & "<p>" & VbCrLf
        
    objRS.movenext
	loop

response.write "you are in "
Else

%>

	<form name="passform" method="POST" action="Test.asp">
  		<p>Password:&nbsp; 
  		<input type="text" name="password" size="20">
  		<input type="submit" value="Submit" name="B3"></p>
	</form>
<%


End if



%>


            
</body>

</html>

Open in new window

0
 

Author Comment

by:Malloy1446
ID: 39764119
It is still going directly to my redirect page!

My include file:

If session("access") = "" then
      If request.form("password") = "password" then
            Session("access") = "verified"
      end if
end if

If session("access")<>"verified" then
      response.redirect("No_Access.asp")
end if
0
 
LVL 54

Expert Comment

by:Scott Fell, EE MVE
ID: 39764146
Your Mentor_Verify2.asp file should be
If session("access") = "" then
	If request.form("password") = "password" then
		Session("access") = "verified"
		else
		msg="Please type in a good password"
	end if
end if

Open in new window

The page
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!-- #Include Virtual="VALNET/CodeReuse/ConnComparisonChart2.inc" -->
<!-- #Include Virtual="VALNET/CodeReuse/Mentor_Verify2.asp" -->
<%
dim title
title = "Password Protect a Page"

msg=""



if Session("access") = "verified" then
' only access the db if verified



'Create recordset
 Dim sql, objRS


 sql = "SELECT tblGeneral.ChartID, tblGeneral.City, tblGeneral.State " & _
	"FROM tblGeneral "

 		If Request.querystring("sort") = "" then
 			sql = sql & "ORDER BY City"
 		Else
  			sql = sql & "ORDER BY " & Request.querystring("sort")
  		End If			

	Set objRS = Server.CreateObject("ADODB.Recordset")
	objRS.Open sql, objConn
end if


%>



<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 12.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title><%=title%></title>

<style>
.msg{background-color:pink;padding:20px;}
</style>
</head>

<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function formHandler(){
var URL = document.form.site.options[document.form.site.selectedIndex].value;
window.location.href = URL;
// End -->
}
</SCRIPT>

<body>




<!--the body tag has the additional onload code added -->
<body onload="passform.password.focus();">

<% if msg<>"" then%>
<div class="msg"><%=msg%></div>
<%end if%>

<%	

'-------------------------------------------------------------------
'If session is verified display the report
If session("access") = "verified" then


%>
<h2><%=title%></h2>


<%

    do until objRS.eof
  	Response.write objRS("City") & "<p>" & VbCrLf
        
    objRS.movenext
	loop


response.write "you are in "
Else
%>

	<form name="passform" method="POST" action="Test.asp">
  		<p>Password:&nbsp; 
  		<input type="text" name="password" size="20">
  		<input type="submit" value="Submit" name="B3"></p>
	</form>
<%
End if



%>


            
</body>

</html>

Open in new window

0
 

Author Comment

by:Malloy1446
ID: 39767042
The asp include file is providing the form to enter the password.
If the correct password is entered, the report is displayed.... GREAT!

BUT, if a user enters an incorrect password, it just displays the form to enter the password, the message to enter a valid password does not display.

I copied your code as shown above. What am I missing?
0
 
LVL 54

Accepted Solution

by:
Scott Fell,  EE MVE earned 2000 total points
ID: 39767299
Replace the password script to
<%
msg="Please type in your password to begin"
If session("access") = "" then
	if request.form("password")<>"" then
		If request.form("password") = "password" then
			Session("access") = "verified"
			msg=""
			else
			msg="I am sorry, that is the wrong password"
		end if
	end if

end if
%>

Open in new window

Replace the body with
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!-- #Include Virtual="VALNET/CodeReuse/ConnComparisonChart2.inc" -->
<!-- #Include Virtual="VALNET/CodeReuse/Mentor_Verify2.asp" -->
<%
dim title
title = "Password Protect a Page"


if Session("access") = "verified" then
' only access the db if verified



'Create recordset
 Dim sql, objRS


 sql = "SELECT tblGeneral.ChartID, tblGeneral.City, tblGeneral.State " & _
	"FROM tblGeneral "

 		If Request.querystring("sort") = "" then
 			sql = sql & "ORDER BY City"
 		Else
  			sql = sql & "ORDER BY " & Request.querystring("sort")
  		End If			

	Set objRS = Server.CreateObject("ADODB.Recordset")
	objRS.Open sql, objConn
end if


%>



<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 12.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title><%=title%></title>

<style>
.msg{background-color:pink;padding:20px;}
</style>
</head>

<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function formHandler(){
var URL = document.form.site.options[document.form.site.selectedIndex].value;
window.location.href = URL;
// End -->
}
</SCRIPT>

<body>




<!--the body tag has the additional onload code added -->
<body onload="passform.password.focus();">

<% if msg<>"" then%>
<div class="msg"><%=msg%></div>
<%end if%>

<%	

'-------------------------------------------------------------------
'If session is verified display the report
If session("access") = "verified" then


%>
<h2><%=title%></h2>


<%

    do until objRS.eof
  	Response.write objRS("City") & "<p>" & VbCrLf
        
    objRS.movenext
	loop


response.write "you are in "
Else
%>

	<form name="passform" method="POST" action="Test.asp">
  		<p>Password:&nbsp; 
  		<input type="text" name="password" size="20">
  		<input type="submit" value="Submit" name="B3"></p>
	</form>
<%
End if



%>


            
</body>

</html>

Open in new window

0
 

Author Comment

by:Malloy1446
ID: 39770123
THANK YOU!!!
0
 

Author Closing Comment

by:Malloy1446
ID: 39770127
Thanks for sticking with it! I will be able to use this in multiple ways on my site. Appreciate your time!
0
 
LVL 54

Expert Comment

by:Scott Fell, EE MVE
ID: 39770842
Great!  

Think about ways to use the feature where you keep track of how many times somebody tries.  You can use any number you want, 3,4,5,100.  Don't think like you think, think like the person trying to do harm that has an automated system to hit that page over and over again.   Typically your sessions last 10 or 15 minutes so that is all they would be locked out for or until they clear cookies.
0
 

Author Comment

by:Malloy1446
ID: 39770946
I may go back and use your lock out code. I wanted the basic password code working first.
Now that I see that, I can add the lockout.

Thanks again!
0

Featured Post

Plesk WordPress Toolkit

Plesk's WordPress Toolkit allows server administrators, resellers and customers to manage their WordPress instances, enabling a variety of development workflows for WordPress admins of all skill levels, from beginners to pros.

See why 2/3 of Plesk servers use it.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Does your audience prefer people in photos or no people? How can you best highlight what you’re selling? What are your competitors doing, and what can you do that is different and unique from them?  Continue reading to learn how to make your images …
When the s#!t hits the fan, you don’t have time to look up who’s on call, draft emails, call collaborators, or send text messages. An instant chat window is definitely the way to go, especially one like HipChat. HipChat is a true business app. An…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question