Home | Advertising Info20 USERS CURRENTLY ONLINE   
   Site Search Contact Us Sunday, February 19, 2017  
 
 







DISCUSSION ARCHIVES
DISCUSSION ARCHIVES 2
DISCUSSION ARCHIVES 3
BLOG

 
Try a free httpZip trial now and compress for less!


We didn't realize
the site was so popular.

Other Stuff
 
 


Simple Password Protection




If you just need to password protect a single page or a series of pages and you don't need multiple users this simple code can be pasted at the top of the page or pages.

You can change the password right in the code. It is set to "sample" right now.

All you need to do is make sure the form in the code posts to itself.
For example: If the page you paste this code into is called "guestbook.asp"
You would change the action of the form to "guestbook.asp".

YOU NEED TO UNDERSTAND THIS.
This example stores the password access as a session variable. Once you give it the correct password it will give you access to the page as long as your session is still alive. If you want to start a new session simply close all of your browser windows and then open your browser again and come back to the page.

Click here to try it out. The password is "sample"
 
If you like this concept check out this awesome application...
It works in a similar same way, but has a user database as well as many advanced features.

http://www.ASPProtect.com
 

Paste the code below directly under the
<%@ LANGUAGE="VBSCRIPT" %> on your asp page. Then underneath all of this code have the entire contents of your page as normal including your own set of body and html tags. If the correct password is entered you will see your page instead of the input form. That's all there is to it... pretty easy ehh.


<%
Response.Buffer = True
STATUS = Request("STATUS")
PASSWORD = Request("PASSWORD")

    
If STATUS = "CHECKEM" Then
     If PASSWORD = "sample" THEN
            Session("PASSWORDACCESS") = "Yes"
      End If
End If

    
If Session("PASSWORDACCESS") <> "Yes" Then
%>

      <HTML>
      <BODY bgcolor="#FFFFFF">
      <form method="POST" action="thispage.asp">
      <div align="center"><center><p><input type="password" name="PASSWORD" size="10"><br>
      <input type="hidden" value="CHECKEM" Name="STATUS" >
      <input type="submit" value="Login"></p>
      </center></div>
      </form>
      </BODY>
      </HTML>
<%
Response.End
End If
%>


 

   Active Server Pages Rule The World
Contact Us  
All artwork, design & content contained in this site are Copyright 1998 - 2017 PowerASP.com and Christopher J. Williams
Banner ads ,other site logos, etc are copyright of their respective companies.
STATS Unless otherwise noted - All Rights Reserved.

Active Server Pages what is asp programming how to sample asp example code scripts software asp forum mail sessions applications global.asa CJWSoft ASPProtect ASPBanner ASPClassifieds www.aspclassifieds.com, www.powerasp.com,www.cjwsoft.com,www.aspphotogallery.com,www.codewanker.com,www.aspprotect.com,www.aspbanner.com