Free Example: Simple Secure Webpage
When starting out in web development, writing a fully-functional application can feel very daunting. For that reason, I’m offering up the source code for a project that I previously created to password protect a webpage using PHP. You can customize it and use it for whatever you want.
Some Notes
In order to have this work correctly, you’ll need to be running PHP on the server you put it on. Also, keep in mind that this method of securing a page is far from foolproof and is just for the purpose of being a learning experience.

Comment Posting Guidance
For the benefit of every non-spambot visiting, following a recent site restructuring I have some rules with regard to etiquette for comment posters. As well as making a better experience for all, they help to distinguish real people for automatic evil machine spam. Due to this, any comment that fails to follow any one of them will be considered spam and removed as soon as possible.
With thanks, Tom