Here is my olde simple script, just make a table with uname & pword and when you add users, MD5 the pass [OR delete the MD5 line from the script]
I usually add the cookies section into a seperate file, to prevent header issues. and the MySQL config into another so that all the other scripts grab the pass from one place.
Mess around, see what happens, thats how I learnt.
(Obviously rename the .txt to .php)