Ask a Question related to Macromedia Flash Data Integration, Design and Development.
-
kidfunctional #1
flash > php > mySQL update query problem
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!
kidfunctional Guest
-
Problem with Dynamic Update Query
I am having a problem with a dynamic query I create a string which will be inserted into the Query tag <cfQuery> Update Table Set #MyVar#... -
MySQL Query Problem
:confused; What is wrong with the following Query? It's in the book, but not working. Select OrderID, OrderDate, (SELECT Count (*) From... -
Flash - PHP - mySQL - update databse records problem
Hi i am having troubnle getting flash to update existing databse records. I can get it to add new records and view existing records buit cant get it... -
php & mysql update problem
Dear news-team I'm using MySQL 4.0.15a (with PHP 4.3.4rc1 and Apache 2.0.47 under FreeBSD). I'm having problems when updating a column of a... -
Problem with MySQL Query
Problem with mySQL Query This is the query I have: $dbqueryshipping1 = "select * from tempuserpurchase where... -
Motion Maker #2
Re: flash > php > mySQL update query problem
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
[url]www.lonhosford.com[/url]
May many happy bits flow your way!
"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!
Motion Maker Guest



Reply With Quote

