2 Replies Latest reply on Jul 15, 2009 8:19 PM by sri harsha namala

    Problem: cant send variables to php.

    NickDF__ Level 1

      hey guys...

       

      I've recently started an application on Flex 3.3 which will be based on a database and it will include some components in order to insert new rows with user feedback to the database.

       

      I'm new to Flex but I've been searching for the last 6 hours and it seems that my flex code and my php code are ok. For some reason though the variables from the HTTP Service are not passed to the php script.

       

      here is my php assignment to variables (I'm not including the code for the insertion to the database table because this is working for sure )

       

       

      <?php

       

      $Alias=$_POST["Name"];
      $Feedback=$_POST["Feedback"];
      $Email=$_POST["Email"];


      ?>

       

       

      and here is my http service.

       

      <mx:HTTPService id="toPHP" method="POST" url="test.php" useProxy="false">
              <mx:request xmlns="">
                  <Email>someEmail</Email>
                  <Name>someName</Name>
                  <Feedback>someFeedback</Feedback>   
              </mx:request>
          </mx:HTTPService>

      <mx:Button x="617" y="51" label="Submit" id="submit" click="toPHP.send()"/>

       

      I tried to navigate to the php file right after the send() through the swf and if i echo the php variables I get 3 errors saying that Name,Email,Feedback are undefined.

       

       

      if you think there is some other part of my mxml needed in order to help let me know so I can post it, but I think that if there is something wrong then its here.

       

       

      Also, I'm using EasyPHP 3.0 in my local machine.