Ahh right Guru, I see your point. Oh well, the problem never arose for me
FlashLite, ok let's look at the script:
<?php $fd = fopen("tempFile.txt", "w");
Tells the server we're using PHP. opens a file 'tempFile.txt' for w
riting to. (ifthe file doesn't exist, create it).
writes to our open file whatever is within the quotes.
closes the file.
The main bit you need to change is the second line... OK so let's say you have a flash movie with a text field into which a user types their name. then you want to output their name to this PHP script (and thus into a text file on the server). We're goign to have to pass your variables from Flash into the PHP script which is done in this way:
loadVariablesNum ("thephpscript.php", 0, "GET");
This can be on a button or a keyframe or whatever. Doing it this way means it happens without the user being taken from flash using GetURL is also possible but it would mean the user is taken out of the flash file.
Now we've specified the GET method for passing our variables to the script. So all we need to do is tell the PHP file the name of the variable we want it to write out to the text document. Variables in PHP are preceeded by the dollar sign ($) so if we wanted to write out the value of variable 'name' into a text file, our PHP would be:
It's that easy.
if you wanted to write it out so it could be read back into flash later in the form:
you would do this:
Not hard huh?
For more info checkout http://www.php.net
The manually is really very easy.
Note this will only work on a webserver which supports PHP so it wont work on your local computer HDD