Ok, tell me why I am not able to load any variables from database using php and mysql. Here is the script I am using, any help would be greatly appreciatted.
My PHP file:
<?
include(’…/db/db_access.php’);
$query = "select * from old_position order by old_position desc limit 1";
$result = mysql_query($query);
$oldxTile = mysql_result($result, 0, 'oldx_tile');
$oldyTile = mysql_result($result, 0, 'oldy_tile');
$onThisMap = mysql_result($result, 0, 'on_map');
echo "&oldxTile=$oldxTile&olyTile=$oldyTile&onThisMap=$onThisMap";
?>
My Flash Script:
getPosition = new LoadVars();
getPosition.load(‘old_position.php’, 0, “”);
_root.get_position.getxTile = getPosition.oldxTile;
_root.get_position.getyTile = getPosition.oldyTile;
_root.get_position.getOnThisMap = getPosition.onThisMap;
nextFrame();
when I ‘trace(getPosition)’ it tells me its a ‘[type Object]’. And when I ‘trace(getPosition.oldxTile)’ it gives me ‘undefined’.
Any feedback is welcome, thanks.