hi…Im using php to check for existance of username. It send back to flash ‘false’ if user already exist, and ‘true’ if user does not exist.
php:
if ($num > 0)//loginName already exists
{
echo "auth=false";
}
else//loginName does not exist, so we can insert this user
{
echo "auth=true";
}
This php works and sends the correct value (true or false).
AS:
[AS]loadInfo = new LoadVars();
added= “Begin Login Process - Please Wait…”;
loadInfo.onLoad = function(success){
if (success)
{
errorRegion=this.auth;//this outputs correctly
if (this.auth == ‘false’)//but this wont check!
{
added= “”;
errorUser=“Username already exists.”;
}
else if (this.auth == ‘true’)//and this wont check!
{
added=“You have been added”;
}
}
else
{
added=“could not load in stuff!”;
}
};
user.sendAndLoad(“userRegistration.php”, loadInfo, “POST”);[/AS]
The ‘if’ statements wont run…its like flash cant recognize what it has already recieved! why?
Can some1 take the time to check whats wrong ! thanks