There's a few things out there that people new to PHP are constantly asking for or asking for help with - connecting to a database, grabbing remote content, and making a login system that will work with thier site.
This last topic has been addressed numerous times in the past, and now PHPComplete.com is taking it on. In Creating a Login Script with PHP and MySQL they take you through, step by step, including all the code and the database structures that you'll need to get it working for your site. They choose to use sessions (the preferred method for keeping someone logged in) to track the user and store their username for future reference. And, with the addition of the super globals introduced a while back in PHP, you can use these session variables to check against and see if a user is logged in or not.
This login system is pretty simple, and they have almost all of it laid out for you - but they do note that it's not the end all of logins. There's still some security holes that could be exploited on this on a production server, but it's probably fine for a small server that not many people have to worry about or deal with. Plus, it gives you a great starting point for something to integrate into your site.




