[PHP] dynamic loadVariables

Hi everyone,

I would like to know if it’s possible todo something like this:

loadVariables(“script.php?id=<? echo “id”; ?>”,0,“POST”);

// the echo thing is nonsense I know, but is it possible to paste the $id, that I’m trying to pass to the external script, from my adressbar (browser)?


Try it… :cowboy:


This AS will call the page script.php (assuming it’s in the same directory - as you haven’t provided a path to it) and attempt to pass an undefined value (you haven’t specified anything after the = ) to the (assumed to exist) variable named $id in the php page. If there are any other variables in the timeline from which the script is called, then it will attempt to pass these as well under separate headers (because you specified post) and any response generated in the php page (most likely an error in this instance) will be passed back to the main timeline (because you specified 0 as the location to load the variables).