1 Reply Latest reply on Sep 19, 2011 1:11 AM by Claudiu Ursica

    Using PHP variables in Flex


      I want to be able to use a PHP SESSION variable with my Flex app.



      The Session variable = $_SESSION['id'];



      Which I can turn into $id = $_SESSION['id'];



      I can also make this a javascript variable: var id = <?php echo $id; ?>;



      How can I import any one of these variables into my Flex code?



      I am assuming you would use the external interface function - but I don't quite know how to use this function in this situation.



      Thank you in advance for your help

        • 1. Re: Using PHP variables in Flex
          Claudiu Ursica Level 4

          If you only need them when you laod the flex app pass themas flashvars.

          As you mentioned you can talk to Javascript thorugh the ExternalInterface.

          Dependeing on the way you choose to communicate between flex and php you can alos pass information attached to the calls:


          e.g. HTTP/Soap or even remoting calls. Obviously this means you will have extra information passing back and forth ...