You should take a look at those links...
The first one is a
question [
^] I posted in the PHP forum some days ago. Take a look at the answers from
nickmaroulis[
^]. The ones marked in red (5ed) are the ones in which he makes nice suggestions to solve the problem.
Apart of that you could get more information
here[
^].
Typically it is not a good idea to use globals (I do it only to store the language selected) and you should try to use functions or other methods to harvest data.
Hope this helps you...