Hi all,
at this moment I am working on a script that calculates standings of our online racing competition. In order to do that, I have to connect to a database on a remote server.
I have read in the php manual that
But for some reason, i simply do not get the script to work. I use a form in the local script to determine which standings are to be shown, and the value is stored in $serie_id. This is done in the main scope (no
function used). $serie_id can be 2, 3 or 4.
If $serie_id is not set yet, it takes value 2 as default.
Then I make an include call to the remote script:
include ("
In that remote script I use $serie_id to make a database query. But so far, the query fails because $serie_id is not known. Also, other variables declared in the local script (like an array for points calculation) are not known.
Are there any known exceptions (f.i. specific server settings) that might explain why the variable is not known on the remote server?
Thanks in advance!
at this moment I am working on a script that calculates standings of our online racing competition. In order to do that, I have to connect to a database on a remote server.
I have read in the php manual that
When a file is include()ed, the code it contains inherits the variable scope of the line on which the include() occurs. Any variables available at that line in the calling file will be available within the called file. If the include() occurs inside a function within the calling file, then all of the code contained in the called file will behave as though it had been defined inside that function.
But for some reason, i simply do not get the script to work. I use a form in the local script to determine which standings are to be shown, and the value is stored in $serie_id. This is done in the main scope (no
function used). $serie_id can be 2, 3 or 4.
If $serie_id is not set yet, it takes value 2 as default.
Then I make an include call to the remote script:
include ("
In that remote script I use $serie_id to make a database query. But so far, the query fails because $serie_id is not known. Also, other variables declared in the local script (like an array for points calculation) are not known.
Are there any known exceptions (f.i. specific server settings) that might explain why the variable is not known on the remote server?
Thanks in advance!