Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recieving variables from a php script using loadvars

Status
Not open for further replies.

sarcus25

Programmer
Apr 14, 2005
27
0
0
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>
************************************************************
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top