View Full Version : PHP and Flash ????

03-12-2001, 12:07 AM
Hello everyone!!!
I have problem as I am new to action scripting...
I work for company that have php programer but I am asked to get and send some variables from my flash intro to php script... stuff as user name and pass and tracking of IP address where user came from...
I would appreciate if someone could help me. I have created form where user can enter user name and pass but I am not quite sure what code to put in submit button loadVariables or getUrl... and how to retrive some data such as ip tracking form php script on server.
Thank you!

03-12-2001, 01:58 AM
loadVariables is generally used for submitting data if you don't want the user to be taken away fromthe flash file. See if you use GetURL it will go to the new page (the php page) in the same browser window so your flash movie will be closed down. If you use loadVariables you can call the PHP script and remain in the Flash movie.

Having said that,t here is no way to get the users IP using Flash so the best idea is to use GetURL I think in your case.

GetURL can use either the POST or GET method. Personally I always use GET because it's easier to debug and less likely to cause trouble but you can use POST also (especially if you're transferring private data, like passwords).

All you have to do is this:

getURL ("thePage.php", "", "GET");

If you put that action on a button it will cause Flash to call your PHP script and ALL the variables in that Flash movie will be passed tot he script. You can then use PHP's ability to get the end user's IP...



03-12-2001, 03:50 AM
Thank you very much!!!