3 Replies Latest reply on Oct 4, 2008 12:45 PM by Newsgroup_User

    Send POST-Data does not work

    polysign.lu
      Hi all,

      I am new to Flex so I try some stuff to get myself into AS/Flex in a good way (I hope :)).
      I wrote a small class that encapsulates the HTTPService class using AS. Then I tried to send some data and I get a response from my server but the POST-Data I try to send does not come up. Everything else seems to wokr in my class...

      Code attached!!!

      Anyone knows why there is no POST-Data sent to my PHP? When I alert the contents of my _objPostData.objPostData I get the Data I entered in my edtLoginUsername/edtLoginPassword. So what goes Wrong???

      Thx
      polysign
        • 1. Re: Send POST-Data does not work
          Level 7

          "polysign.lu" <webforumsuser@macromedia.com> wrote in message
          news:gc7dga$ise$1@forums.macromedia.com...
          > Hi all,
          >
          > I am new to Flex so I try some stuff to get myself into AS/Flex in a good
          > way
          > (I hope :)).
          > I wrote a small class that encapsulates the HTTPService class using AS.
          > Then I
          > tried to send some data and I get a response from my server but the
          > POST-Data I
          > try to send does not come up. Everything else seems to wokr in my class...
          >
          > Code attached!!!
          >
          > Anyone knows why there is no POST-Data sent to my PHP? When I alert the
          > contents of my _objPostData.objPostData I get the Data I entered in my
          > edtLoginUsername/edtLoginPassword. So what goes Wrong???

          Are you SURE you're sure that no post data is getting sent? To me it just
          looks like you're not actually WAITING for the result by attaching an event
          listener to the result event. Instead, you're trying to read the result
          event immediately.

          HTH;

          Amy


          • 2. Re: Send POST-Data does not work
            polysign.lu Level 1
            Hi Amy,

            thank you for your reply. In fact I see the output of my PHP script using Firebug. So I know what gets to my PHP script and what it spits out. It spits out my XML but without any DATA in it. The Data is just print_r($_POST). But the $_POST-array is empty (even in the first line of my php-code).

            What can I try?

            br
            • 3. Re: Send POST-Data does not work
              Level 7

              "polysign.lu" <webforumsuser@macromedia.com> wrote in message
              news:gc862u$ijl$1@forums.macromedia.com...
              > Hi Amy,
              >
              > thank you for your reply. In fact I see the output of my PHP script using
              > Firebug. So I know what gets to my PHP script and what it spits out. It
              > spits
              > out my XML but without any DATA in it. The Data is just print_r($_POST).
              > But
              > the $_POST-array is empty (even in the first line of my php-code).
              >
              > What can I try?

              Does your contentType match what the php script is expecting? Have you used
              Charles or similar to see what is being sent?

              -Amy