First, thanks in advance for any help who can give me with this code. I have been creating a basic and minimalist login that has a very basic user recovery procedure, the client side login is done in flash builder with adobe air output, and the server side uses amfphp type services to interact with the database, what I need is the value of the query that mysql gives me and shows it through a text field, and considering that I am a noob on this, I wanted to know if there was someone who could tell or explain me how to catch the result from amfphp and then display in to a text input in AS3(ActionScrip 3.0).
clear seen from the point of view of this particular case since amfphp only understands the PDO or arrays to show the results in the backoffice, how to later handle from AS3 (ActionScript 3.0) the data obtained from the SELECT performed in mysql
Well, anyway I will leave part of the code and images to complement the support of my question, below you will find the php function that I am using
public function userQuestion($user) {
$this->connection = new DatabaseConnector();
$link = $this->connection->connectDB();
$sql = sprintf("SELECT 'uquestion' FROM users WHERE username='%s'", $user);
$result = mysqli_query($link, $sql);
if($rows = mysqli_num_rows($result) > 0) {
while ($row = mysqli_fetch_object($result)) {
$data [] = $row;
}
return ($data);
} else {
$data[] = null;
}
return($data);
}
and this is the code AS3(ActionScript 3.0)
private function recoverUserHnadler():void {
remoteConnection = new AMFPHP();
var recoverUserHandler:Responder = new Responder(onResultRecoverUserHandler);
remoteConnection.gateway.call("Login.userQuestion", recoverUserHandler);
}
private function onResultRecoverUserHandler(Event:Object):void {
}
below I leave images of the contents of the table of the database and a query made from the backoffice of amfphp where it is evident that the service is working