Hi,
I’ve got an AS3 code that I want to link with a php. That php search in a database (sql or db file) and send results to my AS3 code.
So I’ve got 3 files : my project (FLA file), my php file, and my sql file (and a db file if it’s necessary).
I would like to do this operation offline (local).
How can I do ?
In my AS3 code I’ve got :
var urlreq = new URLRequest(“myPHP.php”);
urlreq.method = URLRequestMethod.POST;
var urlVars = new URLVariables();
urlVars.theport = "New-York";
urlreq.data = urlVars;
var loader:URLLoader = new URLLoader(urlreq);
loader.addEventListener(Event.COMPLETE, completed);
loader.dataFormat = URLLoaderDataFormat.VARIABLES;
loader.load(urlreq);
In my php :
$theport = $_POST['theport'];
//and code dealing with database
linked to a conn.php file :
$cfg_hote = 'mys****.perso';
$cfg_base = '******';
$cfg_user = '*****';
$cfg_password = '****rhx';
How can I do to call the php, make hime use the database locally ? (I know how to do so when the database and the php are online).
Thx ,