Since I'm a fan of beating the horse even if its dead, I gotta agree with paulnaj and stress that in general, global variables are normally NOT the way you want to do things.
If you're comfortable with your decision then ignore this, but if you'd like to give some specs about what you're doing and see if some of the folks around here could suggest some alternatives, I'd say go for it in the name of good coding practices 😉
Erestar