I would like to know if it is possible to password part of a site so that only people that know the password can access it. If it is possible how would you code it?
You don't have to code it, every webserver has this kind of security built-in.
Check the manual of your webserver.
You might actually get some help from this:
There are many ways to password protect a section of a site. What vincent is probably talking about is .htaccess, a method of securing directories and files on Apache web servers.
It sounds like, however, you want something more sophisticated. Check out this great article: <a href="http://www.phpbuilder.com/columns/chad19990414.php3">http://www.phpbuilder.com/columns/chad19990414.php3</a> on this very site for an introduction to the subject.
Good luck!