I'm having some confusing problems with the include.
I have a main-file with the following code:
test.php
<?php
include ("http://www.lavoro.nl/config.php?company=2");
echo "<b>From mainfile</B>"."\n".$companya;
?>
config.php code
switch ($company)
{
case 1:
$location = "http://www.lavoro.nl/";
$companya = "Lavoro Intermediair";
$companyb = "Fluminis";
$companyc = "Work4Y2";
break;
case 2:
$location = "http://www.fluminis.nl/";
$companya = "Fluminis";
$companyb = "Lavoro Intermediair";
$companyc = "Work4Y2";
break;
}
$locationurl = "http://www.lavoro.nl/";
$formurl = $locationurl."content.php?id=0&nav=5" ;
$thankyouurl = $locationurl."content.php?id=2&nav=5" ;
echo "<b>From config</B>"."\n".$companya;
The weird thing....config.php is beeing run. To see that I placed an echo command with variable $companya
In test.php the variable is gone... $companya is empty
If I use:
<?php
include ("config.php");
?>
I have no problems with the $companya....but when using Include with local file I cant do
<?php
include ("config.php?company=2");
?>
So what am I missing over here?