karinos57
asked on
how to create flex login system using PHP as the backend
Hi,
I am using flash builder 4 and would like to create a login system using flash builder 4 as the front end and php as the back end. i found a tutorial that i found on the website but getting this error when i try to run it:
"'HTTPService' declaration must be contained within the <Declarations> tag since it does not implement 'mx.core.IUIComponent'. Login.mxml /Login/src line 27 Flex Problem"
However, i am not sure where i saved the php file is wrong or not as you see i saved the php file under this root ="C:\wamp\www\mylogin.php"
Pls help thanks
I am using flash builder 4 and would like to create a login system using flash builder 4 as the front end and php as the back end. i found a tutorial that i found on the website but getting this error when i try to run it:
"'HTTPService' declaration must be contained within the <Declarations> tag since it does not implement 'mx.core.IUIComponent'. Login.mxml /Login/src line 27 Flex Problem"
However, i am not sure where i saved the php file is wrong or not as you see i saved the php file under this root ="C:\wamp\www\mylogin.php"
Pls help thanks
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600">
<fx:Script>
<![CDATA[
import mx.rpc.events.ResultEvent;
import mx.controls.Alert;
private function login():void
{
loginservice.send();
}
private function onResult(e:ResultEvent):void
{
if (e.result.status == true)
{
Alert.show("Signed in successfully", "Success");
}
else
{
Alert.show("No soup for you", "Failure");
}
}
]]>
</fx:Script>
<mx:HTTPService id="loginservice" url="C:\wamp\www\mylogin.php" showBusyCursor="true" method="post" result="onResult(event)">
<mx:request xmlns="">
<user>{txtUser.text}</user>
<pass>{txtPass.text}</pass>
</mx:request>
</mx:HTTPService>
<s:Panel x="37" y="33" width="468" height="294" title="Login">
<s:Label x="34" y="51" text="Username"/>
<s:Label x="34" y="85" text="Password"/>
<s:TextInput x="98" y="46" id="txtUser"/>
<s:TextInput x="98" y="76" id="txtPass"/>
<s:Button x="156" y="117" label="Login" id="loginID" click="login()"/>
</s:Panel>
</s:Application>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
i did not mean just to give u bad grades but there was no solution for almost 2 weaks and i thought you guys were only experts on php and not flex so i have decided to close it. i have to buy the code from the activeden.net and i thought they were going to show me how to do it but it is not free. thanks anyway for all your efforts.
"Not free" is kind of relative, right? If a script costs $100 and I can buy it or spend a day of my life writing the "new wheel" version of it, I am not going to write new code when I could buy it. For me that would be the path of least cost and least resistance. The expression, "time is money" means to say that these are fungible commodities.
Anyway, best of luck with the project. ~Ray
Anyway, best of luck with the project. ~Ray
ASKER
thanks guys for the help
The activeden.net links looked pretty good to me.