Password protect a single page on a site

Hi,
Please culd someone advise me on the best and simplist way of password protecting a single page on a site? I've done some research and there seems to be a fair bit of conflicting information. I just need anyone that clicks on a certain link to be prompted for a password and if possible be able to change the password on a monthly basis (i'd prefer it if my client could do this as well).
Many thanks
Regards
Rob

Below is a simple username/password page if you only have a handful of clients where a database is over-kill.
It uses php so your hosting provider will need to be able to handle php. This will work with any of the following combination of the username and passsword.
Pink, Elephant
Blue, Sky
Fat, Pig
You can change the usernames and passwords in the php code below to suit yourself and you can add addtional usernames and passwords to the php. You can change the url they will be sent to once they enter the correct combination of username and password.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Untitled Document</title>
<?php
if (array_key_exists('ewTest' , $_POST)) {
$username = trim($_POST['username']);
$password = trim($_POST['password']);
if (($username == "Pink") && ($password == "Elephant"))
$response = "Youre welcome! <a href='http://www.bbc.co.uk'>Enter Here</a>";
elseif (($username == "Blue") && ($password == "Sky"))
$response = "Youre welcome! <a href='http://www.itv.co.uk'>Enter Here</a>";
elseif (($username == "Fat") && ($password == "Pig"))
$response = "Youre welcome! <a href='http://www.adobe.com'>Enter Here</a>";
else {
$response = "Sorry, you do note have permission to access this webpage!";
?>
<style type="text/css">
#wrapper {
width: 250px;
padding: 20px;
margin: 20px auto;
background-color:#CCC;
font-family: verdana, arial, helvetica, sans-serif;
font-size: 11px;
#wrapper p {
margin: 0 0 0 0;
padding: 0;
text-align: center;
input {
width: 250px;
input#submit {
width: 100px;
margin: 15px 0 0 0;
</style>
</head>
<body>
<div id="wrapper">
<p style="margin-bottom: 10px;">Please enter your Username & Password below. (Case sensitive)</p>
<form id="form1" name="form1" method="post" action="passtest.php">
<label>Username</label><br />
<input type="text" name="username" id="username" value=""/><br />
<label>Password</label><br />
<input type="text" name="password" id="password" value=""/><br />
<input type="submit" name="ewTest" id="submit" value="Submit" />
</form>
<p style="margin-top: 10px;">
<?php if(isset($response)) echo $response;?>
</p>
</div>
</body>
</html>

Similar Messages

  • PASSWORD protect an INDIVIDUAL PAGE

    IWEB certainly is a useful publishing tool, but I have come up against an issue. Is it possible to password protect an individual page of a site? I can't seem to find a way to do this?

    My understanding is no. You can create a second site that is password protected and link to a page within that site. Remember the password protection only works aon pages posted to your .Mac account.

  • Is there a way to password protect a single Muse page on website?

    Is there a way to password protect a single Muse page on website?

    There's no function within Muse to do this. Have a look at this thread, it might be of use.
    Re: Can I create a login/password protection in Muse for a HTML5 page or two?

  • Password Protecting a Muse page

    I made a site in Adobe Muse, and would like to password protect a few pages. Ideally, have to type a password every time the URL is accessed (i.e. if someone copy/pastes the link, they would still have to type the password in). Also, I would like a different username and passwords for each page. If someone knows how to create a directory in Muse also, this might solve all my problems.
    Here's Where I Came Up Short So Far:
    - First Solution: Using htaccess and htpasswrd
    Muse creates all its pages with no subdirectories, and no option to create a subdirectories. Which is how most forums described solving the problem. When I uploaded the 'htaccess' and 'htaccess' files to the domain, it caused an error on the main page.
    - Second Solution: Use Widget from Muse-Themes.com
    http://widgets-musethemes.businesscatalyst.com/tb005.html
    I am willing to drop a few bucks to download this, however, this widget only asks for a password when clicking on the link. It doesn't actually protect the url itself. This means anyone can copy and paste the URL into a browser and it will load with no security.
    NOTES
    - It doesn't need to be super secure, but would like to not make the URLs easily accessed to the public.
    - The pages will have links to a DropBox, which will change every few months. Meaning I'll have to do updates to the site. Would prefer to only have to update my Muse file when this occurs.
    Let me know if you need more info, I hope I articulated this semi-clearly. Any help is greatly appreciated!

    Hi,
    You could create all you unprotected pages in one Muse site which you upload to your public folder.
    Then create a new Muse site with your protected pages and upload this to a new folder created in your public folder (which you could password protect in CPanel).
    Obviously, a bit of a headache having 2 ftp folders for one site, and the menu links. But it works
    Hope this helps

  • I WANT TO PASSWORD PROTECT MY HOME PAGE ON I WEB..

    I WANT TO PASSWORD PROTECT MY HOME PAGE ON I WEB..
    I used to use a free bit of code called GateKeeper but it wont work on the Mac server any ideas anyone, the wrong people are viewing my photos.
    PAW

    SW1 Lady wrote:
    ...but it wont work on the Mac server
    iWeb's integrated password protection will work on Apple's MobileMe server. See this doc:
    _Protecting a site with a password_.

  • Is it possible to password protect a single app like Mail?

    Is it possible to password protect a single app like Mail?

    Password protect the Mac Mail app is useless,and would not prevent access to your mailboxes.Your email is stored in files under your home folder,so you must password your mail folder.
    See How to password protect mac Mail for more details

  • How can I add password protection to a Pages document on the iPad?

    Is there any way to add password protection to a Pages document on the iPad? 

    File->Export... and check the encrypt box
    (if you Export as PDF...., click: [Show Details]

  • Help in Setting Password Protection to a Page in DW MX2004

    I need to add password protection to a page.  How do I do this in DW MX2004?
    Any help would be appreciated.
    Dreawmweaver newbie.

    Depends on the following:
    What kind of server are you on - Linux or Windows?
    How secure do you need this to be?
    How many pages do you want to protect?
    How many unique usernames  & passwords do you need?
    If your requirements are simple, start by contacting your host.  They may provide  an Admin Panel from which you could set up a password protected folder.
    Or do a Google search for .htaccess and .htpasswd.
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists
    www.alt-web.com/
    www.twitter.com/altweb
    www.alt-web.blogspot.com

  • Password protect a single directory

    How do I password protect a single directory in finder. I want it to ask for a password before it can even show the contents.

    Well, I use Windoze too, but have been a Loyal Mac user for 4 years, just dropping a bundle on a new 17MBP. I actually didn't realize you could password protect a single directory on Windows. When I needed that before, I dumped files into a password protected ZIP file, and had a program on my Windows box that would show Ziped files as directories and subdirectories.
    Are you thinking I am a Windows user because I said "Directory" instead of "Folder"? I can't seem to switch my terminology since I started with DOS ages ago.
    I thought that since OSX had an underlying UNIX file system that a single password protected folder would be possible. I don't know much about unix, but have used Linux and shell for some websites and that allows individual folders to be password protected.
    Thanks,
    Kirk

  • Is there a way to password protect a single file in numbers?

    Is there a way to passwork protect a single file in Numbers?

    Not directly no - there is this work-around which should still work on iOS 6, or you could see if any of the third-party email apps in the app store support a password, or just access your account via Safari (you can create a homescreen shortcut for your account's login page)

  • Is there a way to password protect a photo page in iWeb?

    My website is open to whoever wants to look at it but I do photography work for clients and would like to password protect their photos. Is there anyway I can password protect just my photo gallery page in iWeb? Thanks!

    If you publish to a server other than MobileMe you can password protect any directory - either by using Webshell or via the .htaccess. If you use the latter method, the data can be compiled using a generator....
    http://tools.dynamicdrive.com/password/
    MobileMe users need to create a new site for the protected content. This site can appear to be part of the main one if it is included in a text based navigation as an external hyperlink or by using a snippet code with the default navigation. This was answered by Cyclosaurus in this topic....
    https://discussions.apple.com/message/15027923#15027923

  • Password Protect Entire Gallery Page

    I know you can protect individual albums but is there a way to password protect the whole gallery page ?
    thanks

    No. You can't password protect the entire MobileMe gallery as a unit but can protect each gallery individually with the same user name and password. '
    If you want to make it convenient for visitors to have access to each gallery you could create an iWeb site with a page of hyperlinks to each of the protected MMe Galleries. Each hyperlink can be set to open in a new window so all it would take to get back to the page of hyperlinks would be to close the gallery window.

  • Password protecting a single MS Word file in Leopard.

    Hi, I have a quick question. Is there a way to password protect or encrypt a single MS Word file in Leopard? I want to encrypt a few sensitive Word doc's but not everything. Thanks- Chris

    If you can't find a more direct way, there's always the option to create an encrypted disk image (using Disk Utility or equivalent) and store the sensitive files on there.

  • Password protecting a single folder

    I have a question about permissions for a single folder. Here is what I want to be able to do: I want to password protect access to a single folder. I want to be able to double click on it... input a password and be granted access to it. Also, when that finder window is closed, I want it to revert back to protected (so that if I need to open it again, I will need to input the password again).
    To save you the time, I already know how to use Apple-i on a folder and use the sharings and permissions to give limited access to a folder. Unfortunately, that is time consuming and tedious to change back and forth every time I am done viewing a folder. I am interested in a "faster" method for keeping a folder and it's contents secure.
    I appreciate any feedback you have on this!
    Grant

    The best "built-in" option is an encrypted disk image, which will do exactly what you want.
    Open up Disk Utility. Go to the help menu and type "confidential" into the search box (without the quotes). Select "Protecting confidential documents in a secure disk image". Follow the instructions, and it will "just work".
    Cheers,
    Rodney

  • Password protecting documents in Pages

    Is it possible to save a document in Pages (1.0.2) with password protection?

    Stephen - This is not possible. I use this workaround for the one or two files I really need to password protect: I use Disk Utility to create a new disk image. I choose the size I want (5 meg is good enough) and select the option to encrypt it. This makes a disk image that requires a password to view. Once it's open, I can put any files I want on it.
    This won't be a good solution if you want to send someone a password protected file or have other needs.
    Incidentally: Since iPods have no security, when I backup my entire personal folder to it, I do it onto the same kind of encrypted image. This should be very safe in case I lose my iPod.

Maybe you are looking for

  • Cannot mount external drives

    Hi all! I have an 2010 imac i5 32GB RAM, running on 10.9.2. All of a sudden my machine does not mount ANY extrenal hard drive. It recognises them in Disk Utility, but they appear greyed and cannot be mounted. Not even disk repair. Last week though th

  • Reg how to a Run a java program 24/7

    i have a requirement to display the content of the folder 24/7,365 days regarding this i have written a program but it seems not much efficient regarding its work can any one help me ; Thread t = new Thread(new ScheduledTask()); t.setDaemon(true); t.

  • CLASSIC doesn't launch on any new accounts

    based upon ffeback from others in this forum re: CLASSIC problems in launching for specific login users in OS 10.39, I proceeded to delete the "problem" account names, and create new ones. This worked for one new account, but not for any others. Now,

  • Party shuffle problems in itunes

    Hi, Just installed the itunes update and i'm having difficulties in the "party shuffle" on my computer. it keeps stopping after every song rather than going from one song straight on to the next as before. if anyone has any advise then i'd be very gr

  • Another name for XI 7.0

    hi experts,                 what is another name for XI 7.0