I want to declare a global - $TournamentID to share between forms on the site. The user can select the TournamentID from a dropdown on Form1 and that is set for the rest of the site until it is changed.
In the pre_render of each other form I want to use this global to know what data to pull back from the database (MySQL).
I declare $TournamentID in functions.php and have get and set functions for manipulating the global, to save having to declare the global wherever I need it.
In Form1, the pre_render can set/get the global value no problem.
However when I go into the pre_render of Form2, this global is null !
How/where do I declare this global ?
I know I can pass parameters in the request and that works fine, but a global would save lots of code and make life so much easier.
I must be doing something fundamentally wrong because I cannot find anything closely related in here or on the web.
I'm using PHP on WordPress, both up-to-date. The platform is Windows Server 2003 with IIS.
Any ideas ?