2 Replies Latest reply on Apr 17, 2006 3:20 AM by Mrinal Banerjee

    Flash & Php

    Mrinal Banerjee Level 1
      I want to pass a variable from flash to php. How do I do that?? I am using Flash 8. I had written the code in flash that loads php file given below..


      And I had written in myphp.php file to catch the variable;

      But it do not work... Pls help me...
        • 1. Re: Flash & Php
          sneakyimp Level 2
          have you defined myXml as an xml object yet? if not, the .load command is going to be meaningless.

          furthermore, your xml variable expects your php file to return some xml. do you have your php file outputting any xml values?

          lastly, you need a dollar sign ($) in front of HTTP_GET_VARS and some quotes around myVar like this:

          $value = $HTTP_GET_VAR['myVar'];

          Generally speaking, you will get better results if you provide the exact code your are having trouble with. Don't post ALL of it necessarily, but enough for someone to make a diagnosis.
          • 2. Re: Flash & Php
            Mrinal Banerjee Level 1
            Ok Sneakyimp... I privide all of my codes there... In my Flash I add two text area named status_txt and output_txt.and written a Frame script like..
            var value:String="Mrinal"
            var myXml:XML=new XML();
            if (success){
            Status_txt.text=" Loaded Properly";
            Status_txt.text=" Error Loading Xml";

            In myPhp.php file I had witter a code like below:

            $key = $HTTP_GET_VARS['myVar'];
            echo '<?xml version="1.0" encoding="UTF-8"?>';
            echo '<datapacket>';
            $line = '<row value="'.$key.'" />';
            echo $line;
            echo '</datapacket>';