Ok dev people... I was asked to look into an aging site and make a "quick change" -- haha. The code is ghoulishly bad... spaghetti everywhere. Here’s what I cannot figure out... the page in question uses 3 include files, and it calls one function which reads custom form definitions right out of the $GLOBALS array, e.g.
$myform = $GLOBALS['forms']['myform'];
Ok, that’s not how I would have done it, but ok. But I cannot for the life of me see where they @#%@#^ this data was ENTERED into the $GLOBALS array. There are only 3 files involved here, and none of them write anything to the $GLOBALS array that I can see.
Am I blind? Or is there some other way that values got populated in there? The included files don’t include other files, so I think I’ve tracked down all PHP code involved in producing this one page. But I remain baffled.
Any thoughts?