PDA

View Full Version : FMS LoadVars() issue


sankey
02-15-2006, 04:34 PM
I didn't see a Media Server forum, so I figuered this was the closest thing to it. I'm using LoadVars to pass data from the Media Server in main.asc, to a PHP page that then places it in my database. However, I am seeing some strange results when the data gets to my PHP page. For instance the dash (-) character is coming an E; periods (F), parenthesis (@A) and variables with underscores in their names are also strange. The contentType is set to application/x-www-form-urlencoded. And I am using POST.

Would this be due to using the developer edition? Has anyone else had any similar issues?

Below is my method for using the LoadVars object:

function updateDB(object, file, method) {
trace('update DB');

var my_lv = new LoadVars();
my_lv.method = method;

for(var prop in object) {
my_lv[prop] = object[prop];
}

var listener = new LoadVars();
listener.onLoad = function(success) {
if(success) {
trace('DB update success');
} else {
trace("Faild update");
}
}

dbFile = PHP_SERVER + file + ".php";
my_lv.sendAndLoad(dbFile, listener, "POST");
}

sankey
03-04-2006, 01:07 AM
this was fixed with the FMS 2.1 upgrade