Skip to main content
Known Participant
February 5, 2007
Question

Email vars from swf file - NEED HELP Please

  • February 5, 2007
  • 4 replies
  • 263 views
I have an interactive flash file that has dynamic variables that I'm trying to send to a php file which in turn will send an email with the variables attached.

I'm using SendAndLoad with "POST" to send the variables to php and an email script in php to send the variables.

I have been able to send an email but the variables are not attached. I read in Flash documentation: "Make sure you test your documents in a browser window, because otherwise your variables are sent using GET".
And GET will not let me send a long string (which I have as well as other variables).
I also tried playing the swf from the server with the php file. I got an email but the variables were not included. For this testing, I have not included my long string, just short variables to get going. Yet they are not in the email.

In the end, this needs to work when playing the swf from a CD, while on line, but won't be played from a server.

Can this be done? Any suggestions?

Thanks in advance.
Denise
This topic has been closed for replies.

4 replies

Inspiring
February 7, 2007
can you post the part of your php script that send the email?
Known Participant
February 5, 2007
Thanks for your response.
I am using the LoadVars Object in Flash. I learned I had to use the SendAndLoad to prevent a new browser from opening. That part works now.

Can you give me some direction on how to do the debug script?
Right now I'm getting one variable sent in the email, sometimes. Does the debug script depend on success of the email?

Thanks,
Denise
Inspiring
February 5, 2007
regarding your problems with the variables I suggest to steps:
1.) use the LoadVars Object to send your data to the php
2.) in the php script you should try to generate some debug output by putting all submitted GET and POST Variables (just do a foreach loop on the $_POST and $_GET Array) into the generated email
Inspiring
February 5, 2007
regarding your problems with the variables I suggest to steps:
1.) use the LoadVars Object to send your data to the php
2.) in the php script you should try to generate some debug output by putting all submitted GET and POST Variables (just do a foreach loop on the $_POST and $_GET Array) into the generated email