Personally I use $_REQUEST['varname'];
ex: $_REQUEST['user];
You can try echo back the variables to Flash but I believe you need two
LoadVars objects with sendAndLoad.
myvarsResponse = new LoadVars
myvarsResponse.onLoad = action;
myvars.sendAndLoad("the processingfile.php?random="+new Date().getTime(),
myvarsResponse);
--
Lon Hosford
www.lonhosford.com May many happy bits flow your way!
[quoted text, click to view] "kidfunctional" <webforumsuser@macromedia.com> wrote in message
news:e27i6a$e14$1@forums.macromedia.com...
Hi all! Bit of an urgent problem. I am trying to update a mySQL database via
flash and PHP where two variables are supplied, a name and a contact ID. I
can
pass the variables to the php and check against two variables in the PHP to
check their validity, and I can run the mySQL update query with hardcoded
elements and the database updates. The only problem is when I try to pass
the
variables through embeded in the query. Eg. in the PHP the query $query =
"UPDATE contacts SET firstName = 'name' WHERE contactId = '1'"; works but
$query = "UPDATE contacts SET firstName = '$user' WHERE contactId =
'$pass'";
doesn't. Apologies for the function code post, but the variables are passed
from Flash using the following code:
function login(user, pass) {
myvars = new LoadVars();
//set variables
myvars.user = user;
myvars.pass = pass;
myvars.onLoad = action;
myvars.sendAndLoad("the processingfile.php?random="+new Date().getTime(),
myvars);
}
Any replies would be greatly appreciated!