I have a as3 file where I am sending data to a php page, the php checks for the users login information from the database and displays either true or false response. I am getting a wierd %0A%0AlogError=true in the results of the as3 coming from php.
Here are the code snippets:
PHP Code:
<?php
$name = $_POST['fullName'];
$email = $_POST['loginEmail'];
//Database and sql statements
//Query database
//Save query in $result
if(!mysql_num_rows($result)){
echo "logError=true";
}else{
echo "logError=false";
}
?>
Code:
//saving to MovieClip(root) for use in the fla (this is a MC that pops up if the user is not loged in to the system.
MovieClip(root).loginName = firstName.text + " " + lastName.text;
MovieClip(root).emailAddress = email.text;
//send variables to php script and retrieve reply
var requestIt:URLRequest = new URLRequest ("http://www.myDomain.com/myPage.php");
requestIt.method = URLRequestMethod.POST;
var sendTo:URLVariables = new URLVariables();
sendTo.fullName = MovieClip(root).loginName;
sendTo.loginEmail = MovieClip(root).emailAddress;
requestIt.data = sendTo;
var loadIt:URLLoader = new URLLoader (requestIt);
loadIt.addEventListener(Event.COMPLETE, checkIt);
loadIt.dataFormat = URLLoaderDataFormat.VARIABLES;
loadIt.load(requestIt);
function checkIt (event:Event):void{
scriptResult = event.target.data;
trace(scriptResult);
}
Thanks in advance
BeyondFlash