Copy link to clipboard
Copied
public function processCreate():void {
var urlVars:URLVariables = new URLVariables();
var urlFileRequest:URLRequest = new URLRequest("php/controlpanel.php");
urlFileRequest.method = URLRequestMethod.POST;
urlFileRequest.data = urlVars;
var php2Loader:URLLoader = new URLLoader();
php2Loader.dataFormat = URLLoaderDataFormat.VARIABLES;
php2Loader.addEventListener(Event.COMPLETE, showResult);
urlVars.systemCall = "createprofile";
urlVars.username = username.text;
urlVars.password = password.text;
php2Loader.load(phpFileRequest);
}
This is my function on a .as file. I want send username and password to php to create a new user profile in mySQL.
I just copy/paste this code I don't know harp what am I doing, I want to do something simple, like trace, but to test the connection between flash and the php/controlpanel.php.
Before I go further adding more codes I want to test if 2 files are properly connected, how do I do that, thannk you.
The first thing you need to do is test using a server that supports php and place that php file on the server.
The next thing you'll need to do is fix the variable name you use to agree with what your code specifies up top...
php2Loader.load(urlFileRequest);
Confirming whether or not the connection worked can be managed with whatever your showResult function does.
Copy link to clipboard
Copied
The first thing you need to do is test using a server that supports php and place that php file on the server.
The next thing you'll need to do is fix the variable name you use to agree with what your code specifies up top...
php2Loader.load(urlFileRequest);
Confirming whether or not the connection worked can be managed with whatever your showResult function does.
Copy link to clipboard
Copied
Hi, Ned.
After I fixed urlFileRequest, showResult shows properly in the dynamic text box now, thanks a lot.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now