This really depends on what you're using it for.
If it's for a blog-type application, use some sort of open source solution
WordPress is a popular one.
Otherwise, check this out:
http://www.php-mysql-tutorial.com/
Pay special attention to #14 on that page.
Bookmarks