Alors j'essaie de faire un simple login avec AS3 et amfphp. J'arrive à appeler le service, mais j'ai un problème fondamental: même si je rentre un mauvais email/pass, le script retourne un RecordSet! Bonjour le login. Alors je me doute que forcément, il me faut revoir soit mon AS3, soit ma méthode php.

A votre avis que dois-je changer?
Ci-desous l'essentiel de mon code, qui dans tous les cas retourne "[object Object]"

AS3 (Login.as):
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
		private var connection:NetConnection;
		private var responder:Responder;
		private var __email:String;
		private var __password:String;
 
		private static  const GATEWAY:String = "http://localhost/amfphp/gateway.php";
 
 
		//constructor
		public function Login() {
 
			setUpForm();
 
			loginBtn.addEventListener(MouseEvent.CLICK, doLogin);
 
			connection = new NetConnection();
			responder = new Responder(handledoLogin, null);
 
			connection.addEventListener(NetStatusEvent.NET_STATUS, errorConnection);
			connection.addEventListener(IOErrorEvent.IO_ERROR, errorConnection);
			connection.addEventListener(SecurityErrorEvent.SECURITY_ERROR, errorConnection);
			connection.addEventListener(AsyncErrorEvent.ASYNC_ERROR, errorConnection);
 
			connection.connect(Login.GATEWAY);
 
		}
 
 
		private function doLogin(pEvt:MouseEvent):void {
			if (emailI.text !="" || passwordI.text !="") {
				__email = emailI.text;
				__password = passwordI.text;
				connection.call("shopping.getClient", responder, __email, __password);
			} else {
				msg.text = "all fields are required!";
			}
		}
 
		private function errorConnection(pEvt:Event):void {
			trace(pEvt);
		}
 
		private function handledoLogin(re:Object):void {
			if(re != null) {
				trace(re);
			} else {
				msg.text = "invalid email/password";
			}
		}
PHP (shopping.php):
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
function getClient($Email, $Password)
	{
		return mysql_query("SELECT * FROM Clients where Email='".$Email."' AND Password='".$Password."'");
	}