6 Replies Latest reply on May 14, 2008 9:14 AM by cosu

    loadVars problem

    cosu
      hello!

      i'm having a problem with sendint variables through POST to a PHP file.

      the flash code is something similar to the attached code. it used to work just fine until it stopped working. now, i had to change it to GET to make it work...

      with POST, none of the variables i send get to my PHP file.

      it this a bug?
        • 1. Re: loadVars problem
          kglad Adobe Community Professional & MVP
          that's no php file.
          • 2. Re: loadVars problem
            Level 7
            Are you ure it's just not working in the IDE? In the IDE you'll need to use
            GET or REQUEST in PHP - POST doesn't work properly... have you tested
            online?

            --
            Dave -
            www.offroadfire.com
            Head Developer
            http://www.blurredistinction.com
            Adobe Community Expert
            http://www.adobe.com/communities/experts/


            • 3. Re: loadVars problem
              cosu Level 1
              it stopped working with post in any circumstances. the problem is that IT WORKED!! this is where my problem is.

              it happened to me before. i thought it's something i miss... but it wasn't me.

              i can use $_GET successfully, but with the firebug in mozilla anybody can see my variables...



              quote:

              Originally posted by: Newsgroup User
              Are you ure it's just not working in the IDE? In the IDE you'll need to use
              GET or REQUEST in PHP - POST doesn't work properly... have you tested
              online?

              --
              Dave -
              www.offroadfire.com
              Head Developer
              http://www.blurredistinction.com
              Adobe Community Expert
              http://www.adobe.com/communities/experts/





              • 4. Re: loadVars problem
                kglad Adobe Community Professional & MVP
                it's almost certainly a programmer error especially if you think you're calling a php file and post code to call a cold fusion file.
                • 5. Re: loadVars problem
                  cosu Level 1
                  well, the loadVars script below was just a sample code... to tell you that's what i'm using...

                  i think i've solved the problem. still investigating...

                  it seems loadVars is called TWO TIMES!! first time it sends all the post variables... just the way it should do... the second time it calls the script (whatever that is... php in my case) but it doesn't send any of the post variables.

                  if you follow the result in mozilla w/ firebug... you will see no output from calling the script... even if you use a print_r($_POST)... but this is only because the second call of the script is very fast, and firebug only gets to show the second call output.

                  i don't know if i made myself clear explaining this...

                  i'll just mark this post as "answered"
                  • 6. Re: loadVars problem
                    cosu Level 1
                    one more thing... just in case somebody will face the same problem...

                    if you test loadVars with from a simple flash... it won't send twice!

                    at least for me... it only happens with complex projects.

                    i have no idea what causes this bug.