I'm wondering if someone can help me. I have a flash document and I'm trying to get dynamic information from a PHP file into the flash file. Hope this makes sense
Inside the flash document I have a text box (var: who)
the AS I'm using is
onClipEvent (load) {
loadVariables("load.php", this, "GET");
}
Inside the PHP file I'm using the following code to send the data to the flash file:
<?php
$user = $_GET['username'];
$person = "Username: $user";
echo "who=$person&";
?>
This doesn't print anything!? But if I change the value of $user to 'something' and not $_GET then it works perfectly. Am I doing something wrong? I need to read the value of $_GET and send it to the flash document. I know that value isn't empty because if I view the page itself it shows up, its just not sending to flash. Have I done something wrong?
I would really appreciate some help.
[help] sending PHP variable to flash?
Started by
csj16
, Mar 11 2008 08:55 AM
2 replies to this topic
#1
Posted 11 March 2008 - 08:55 AM
#2
Posted 12 March 2008 - 04:25 PM
Moved to probably a more useful forum.
#3
Posted 15 March 2008 - 04:53 PM
why are you using the : ?
try sending them as:
echo "who=" . $user;
or many variables need an output like this:
In flash, I allways use something like this:
try sending them as:
echo "who=" . $user;
or many variables need an output like this:
id=1&title=This+Is+My+Title&date=2008-03-16&who=dotbart
In flash, I allways use something like this:
var lvContent:LoadVars = new LoadVars(); lvContent.load("http://myhost.com/myvarstoflash.php?username=dotbart"); trace("Who: " + lvContent.who); //Outputs: Who: dotbart
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users