This is very basic, but I've spent quite a while looking through the manual and also searched threads here and have not found an answer that is a simple as I feel this ought to be.
I want to include a file on another domain and I want to pass 1-2 variables to it. Without the URL target it would look like:
<?php
$id = 777777;
include 'template.php';
?>
then template.php can use $id as it is defined above.
With a URL target this does not work. I have found something that does work but it is messy in application:
<?php
include 'http://www.domain.com/template.php?id=777777"';
?>
[ note the " and ' at the end of the 777777]
This carries the variable $id as 777777" and can be used as part of a link structure in the template, but it is very easy to end up with with lots of unwanted spaces (hence the " at the end of the numbers).
Is there a tidier way of passing the variables. I have been reading about global variables etc but I can't seem to put it together in my head.
Under function "include" in the manual we have:
"variables may be passed to the included file using an URL request string as used with HTTP GET" but then I can't find a description of http get that discusses the passing of variables.
Thanks for any help
ayj