azadder
12-21-2005, 05:49 PM
I am using flash to get information from php (from a database). I am having problems getting the info FROM php back to flash.
Here's what I have (flash side):
on (click) {
var tophp = new LoadVars();
var fromphp = new LoadVars();
tophp.num = "85";
tophp.sendAndLoad("update.php", fromphp, "POST");
fromphp.onLoad = loadedphpvars;
function loadedphpvars(){
}
}
I know that the function is empty, there isn't anything that I want to put in it now.
I have a dynamic text instance that I want to hold the data that is coming back from php. I set the Var (of the dynamic text instance) to "phpname".
Here's the code I have for the php page:
<?php
include 'dbfunc.php';
$id = $_POST["num"];
$conid = connect_to_database();
$name = sel_fromid($conid,"name","ID",$id,0);
echo "&phpname=".$name;
?>
(The php custom functions are all correct/work)
The dynamic text instance isn't updating... Any suggestions/ideas?
Here's what I have (flash side):
on (click) {
var tophp = new LoadVars();
var fromphp = new LoadVars();
tophp.num = "85";
tophp.sendAndLoad("update.php", fromphp, "POST");
fromphp.onLoad = loadedphpvars;
function loadedphpvars(){
}
}
I know that the function is empty, there isn't anything that I want to put in it now.
I have a dynamic text instance that I want to hold the data that is coming back from php. I set the Var (of the dynamic text instance) to "phpname".
Here's the code I have for the php page:
<?php
include 'dbfunc.php';
$id = $_POST["num"];
$conid = connect_to_database();
$name = sel_fromid($conid,"name","ID",$id,0);
echo "&phpname=".$name;
?>
(The php custom functions are all correct/work)
The dynamic text instance isn't updating... Any suggestions/ideas?