all groups > flash (macromedia) > march 2005 >
You're in the

flash (macromedia)

group:

LoadVars doesn't work for me


LoadVars doesn't work for me GreatWallup
3/28/2005 9:49:24 PM
flash (macromedia):
hi all,
i've followed every tutorial i've found on the net and i still can't get flash
to send variables to a php script
i make text input fields, i give them all instance and var names, i create a
button and give it actionscript like this...

on (release) {
c = new LoadVars();
c.send("script.php", "_parent", "POST");
}

in the php page i type out all the script and have tried identifying the
posted variables with both $_POST and $HTTP_POST_VARS. the php script is called
but the variables are never passed. i know this because when i go...

if (isset($_POST['fieldname'])) { echo "yes"; }
else { echo "no"; }

...it will echo "no".

does this explain my problem clearly enough?
any help greatly appreciated.
Re: LoadVars doesn't work for me David Powers
3/29/2005 12:06:37 AM
[quoted text, click to view]

Go to this address:

http://computerbookshelf.com/php5flash/

Take a look at the details of my new book, and then download the sample
chapter (a 39-page PDF file). If you're already familiar with PHP, much
of the first half of the chapter will be old hat, but the second half
contains a fully-worked tutorial in getting variables to and from Flash
with PHP. There are also downloadable files in both MX and MX 2004 format.

No registration required; it's completely free. But if you do find it
useful, I hope you'll consider buying the book, and making my effort
worthwhile.

If you run into problems, post any questions in the friends of ED forum
at www.friendsofed.com/forums.

--
David Powers
Author, "Foundation PHP 5 for Flash" (friends of ED)
Co-author "PHP Web Development with DW MX 2004" (Apress)
AddThis Social Bookmark Button