There are two main ways you can go, either authentication through Apache or through PHP; both have advantages. Authenticating through PHP does not allow you to restrict access to non-php files. Going through Apache must use the browser's login screen (which is not pretty).
For more information on Apache's login search for .htaccess and mod_auth or mod_auth_mysql. For information on PHP search for $_SESSION. I would suggest trying to read up on both methods and decide how you want to do it. Either way is fairly easy to implement it is more a matter of choice.
Must read Review for Serious PHP Developers
NuSphere PhpED 5.5
: The Staff of php-editors.com recently spent a few days working with NuSphere
PhpED 5.5
(a popular PHP IDE) and
NuCoder 2.0
(a PHP Encoding Utility), read up on all the details.