PDA

View Full Version : php....


zex
03-12-2001, 05:22 PM
What should I do to get data (querystr) from php script to Flash 5 and pass it back to the same php script, but with that data I am going to pass user name and pass as well at the same time on one button click. Should I put code in same place where is my submit button?
Do I have to declare new variable or I can just somehow call it an return it. I am not going to change that data and after user click submit I will go out of Flash and php will bring me to new html page but in html page source that data that I pass should be seen... with user name and pass.
Thank yuo very much! I hope that question is clear...I know how to pass user name and pass and it works thanks to Jesse for explanation but I still don't know how to get some data from php scrip and pass it back to that script.
Thank you one more time!
zex

Jesse
03-13-2001, 07:02 AM
My loadVars and PHP interaction tutorial at http://www.actionscripts.org/tutorials/intermediate/loadVariables_script_interaction/index.shtml shows how you can call a PHP script with loadVars and send it various variables and have results returned automatically.

If you're trying to do something like get database data via PHP into Flash though you might need 2 scripts. The first you would call use loadVariablesNUM, it interacts with your database and sends the data back to flash using the method described in the tutorial above. Then that data is safely within flash and you can manipulate it however you like then call another PHP script with loadVariables again when you're ready to write to the database.

That's just an example...

In general I use loadVariablesNUM and the GET method for sending and retrieving data from a PHP file.

Cheers

Jesse