Posted 09 July 2009 - 03:23 AM
There are several ways to organize a site. The most basic uses a bunch of static .html files. There is a tendency to use that model when you advance and use a bunch of .php files that are called directly by the browser. This would be something like page1.php, page2.php, page3.php. Each would need to include your connection file.
An alternative is to have a file like index.php, which is called with parameters. index.php?page=1, index.php?page=2, etc. Then it includes the dbconnection AND the appropriate pageX.php file.
You can also do some mix&match. For example, you could have pageX.php include resources.php, which then includes all the resource files you have created, including the db connection file. You could also have a cleanup.php file which closes db connections, etc.