An easy solution (or at least one of a few) is:
Create a php file with a name like “setmyvars.php”.
In this file you have:
$variable1 = $_GET["variable1"];
$variable2 = $_GET["variable1"];
$variable3 = $_GET["variable1"];
And at the top of any page referencing these variables, add the line:
<? require_once("setmyvars.php"); ?>
If setmyvars.php isn’t in the same folder, use the standard “…/” etc to finet he right dir, or use the full path, such as “/home/username/domain.com/includes/setmyvars.php”.
That’ll mean you just add new vars to the file whenever you add new ones.
In my opinion a much better way (and you’ll hear me say this a lot) is to rewrite your code explicitly using $_GET[""] for url variables, and $_POST[""] for form variables.
web design, development, pay per click marketing (PPC) & Search Engine Optimisation (SEO) by DigitalVibe