sarcus25
Programmer
- Apr 14, 2005
- 27
Hi I am trying to recieve variables from a php script but the variables have extra info included such as html tags & blank lines. My php code is as follows.
************************************************************
<?php
$temp = "just testing";
echo "&temp=".$temp;
?>
************************************************************
The Action script code I use to recieve the variables is as follows.
************************************************************
lvdata = new LoadVars();
lvdata.onLoad = function(success):Void{
if (success){
txtdata.text = lvdata.temp;
trace(lvdata.temp);
trace ("loaded Successfully");
}
else{
trace ("variable loading error");
}
}
button1.onRelease = function():Void{
lvdata.load("
}
************************************************************
I can recieve and and load the variables ok but a litte extra gets added to the variable. Below is the output that I get when traceing the temp variable. AS you can see I get the variable data which is fine but I also get a few blank lines after that and the ending Body and html tags. I am using flash 8. Thanks in advance.
***********************************************************
just testing
</body>
</html>
************************************************************
************************************************************
<?php
$temp = "just testing";
echo "&temp=".$temp;
?>
************************************************************
The Action script code I use to recieve the variables is as follows.
************************************************************
lvdata = new LoadVars();
lvdata.onLoad = function(success):Void{
if (success){
txtdata.text = lvdata.temp;
trace(lvdata.temp);
trace ("loaded Successfully");
}
else{
trace ("variable loading error");
}
}
button1.onRelease = function():Void{
lvdata.load("
}
************************************************************
I can recieve and and load the variables ok but a litte extra gets added to the variable. Below is the output that I get when traceing the temp variable. AS you can see I get the variable data which is fine but I also get a few blank lines after that and the ending Body and html tags. I am using flash 8. Thanks in advance.
***********************************************************
just testing
</body>
</html>
************************************************************