| Home | Tutorials | Forums | Articles | Blogs | Movies | Library | Employment | Press | Buy templates |
|
|
#1 |
|
Registered User
Join Date: Oct 2009
Posts: 1
|
Hey gang I'm new to Flex, trying to receive some data via PHP. Both the php and flex scripts run but it does not receive data. Just sits there waiting on response form the web server. Any help is appreciated here is my code.
PHP: require('globals-mconnect.php'); if( $_POST["eagle"]) { //add the user $Query = "SELECT * FROM MYGSUSER WHERE USER_STUID= '".$_POST['eagle']."'"; $Result = mysql_query( $Query ); $Return = "<MYGSUSER>"; while ( $User = mysql_fetch_object( $Result ) ) { $Return .= "<user><USER_PIDM>".$User->USER_PIDM."</USER_PIDM><USER_FNAME>".$User->USER_FNAME."</USER_FNAME><USER_LNAME>".$User->USER_LNAME."</USER_LNAME></user>"; } $Return .= "</MYGSUSER>"; mysql_free_result( $Result ); } ?> Flex Script: <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" borderColor="#42DF64" backgroundGradientAlphas="[1.0, 1.0]" backgroundGradientColors="[#B1ACAC, #514E4E]"> <mx:HTTPService id="userRequest" url="https://webtest.georgiasouthern.edu:4102/portal/services/flextest2.php" useProxy="false" method="POST"> <mx:request xmlns=""> <eagle>{eagle.text}</eagle> <USER_PIDM>{USER_PIDM.text}</USER_PIDM> <USER_FNAME>{USER_FNAME.text}</USER_FNAME> <USER_LNAME>{USER_LNAME.text}</USER_LNAME> </mx:request> </mx:HTTPService> <mx:Form x="22" y="10" width="493"> <mx:HBox> <mx:Label text="Eagle ID"/> <mx:TextInput id="eagle"/> </mx:HBox> <mx:Button label="Submit" click="userRequest.send()"/> </mx:Form> <mx:DataGrid id="dgUserRequest" x="22" y="128" dataProvider="{userRequest.lastResult.MYGSUSER.use r}"> <mx:columns> <mx:DataGridColumn headerText="User Pidm" dataField="USER_PIDM"/> <mx:DataGridColumn headerText="User First Name" dataField="USER_FNAME"/> <mx:DataGridColumn headerText="User Last Name" dataField="USER_LNAME"/> </mx:columns> </mx:DataGrid> </mx:Application> Thanks! |
|
|
|
|
|
#2 |
|
Member
|
it wont work just like this. Instead of trying this way i suggest you use amfphp
|
|
|
|
|
|
|
|
|
#3 |
|
Site Contributor
Join Date: Dec 2007
Location: Vermont, USA
Posts: 3,178
|
PHP Code:
__________________
aswebcreations |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|