Skip to main content
Participant
June 15, 2007
Question

Flash vars from flash to separate php page

  • June 15, 2007
  • 2 replies
  • 230 views
Flash MX 2004

I have a flash form that I need to pass to a separate php web page and I'm stumped. I'm very close here, but confused. In flash, using some named text fields, I have (in a frame):

stop();
submitButton.onRelease = function() {
getURL(" http://some.com/file.php","_blank","GET"); }

I am getting diddly squat on my php file. I know this because I am echoing the var.

However, if I use my_vars = new LoadVars(); and set up every form field like

my_vars.field1 = field1.text; etc...

That does indeed pass the vars via GET or POST. However.. what I end up with is essential one variable, my_vars. I then will have to parse and break up this var to get usable variables in php.

What's really confusing me is that can use this same new LoadVars method in conjunction with my_vars.SendAndLoad("some.php") and all the vars come along perfectly. The problem with that method is that the browser stays in the flash movie and the user never acutally SEES some.php. For my purposes, I need to create a form using flash and pass those vars to a separate php web page.

Help!? Thanks 🙂
This topic has been closed for replies.

2 replies

Inspiring
June 15, 2007
or [simple typo funonmars ;-) ]
my_vars.send(" http://some.com/file.php","_blank","POST");

I used it a few times today for just the type of thing you're describing... it should do what you're after.
Inspiring
June 15, 2007
Have you tried:
my_vars.send(" http://some.com/file.php",my_vars,"POST");