Duplicated code and global variables are both pure evil, IMHO. I'm not sure which is worse in general, but in this case I think having the same info duplicated between 15 scripts would definitely be more of a Bad Thing(tm) than using globals (/me dons handy flame-retardant suit... :)
I think the best choice you mentioned is definitely the "functions file" method (a module even?) with a function returning the proper settings. Personally, I wouldn't hard-code global values into the code though, at least not if they're likely to ever change. Use a separate configuration file (e.g. a text file) instead. This way once you get your code working you don't have to go back and change it just because you moved the database.
Hope this helps!