> I have one file with several sections of code which I have so far > accessed using a good old fashioned - - if ($HTTP_GET_VARS['action'] == > "Update") - - however I now want to include this code within some other > web pages, I thought I may be able to use the following code - - > include("/modules.php?action=Update") - - however the code does not run. > Hoping someone can help me out on a way to overcome this. I am running > IIS 5, and PHP 4.2.3
When you include() a file, it has the same variable scope as the file it was included from. So, if you have the following code: $action = "Update"; include("modules.php"); Then you can use $action in modules.php and it'll be set to "Update". modules.php will have the same variables as the file that included it. I hope that helps... ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php