you shoud seek out a tutorial on writting PHP classes. this will help you a lot in the future. it's good practice in my opinion to write it once and reuse it forever. building up a library of classes will help you not having to waste time rewriting or copy/pasting/modifiy'n
look around the web for a good PHP or PHP/MySQL cookbook, they are good sources for learning quickly and correctly.
i will write database connections and other functions in one page and i will include in every page
so, there is no need of copy paste or modifications. i will surely take a look at php classes
if it is useful to me i will be grateful to u jel