Hi,
for some reason, I cant get my variables in Flash8 sent to a php file.
I have a local server set up on my PC, so maybe its a security issue???
I tried using getURL and it seemed to send as I could see the variables in the url but I could not echo them in the php file.
Now I’m trying the loadVariablesNum method
I have the following variables attached to input boxes:
name_var, age_var, address_var
I also have a button called submit_btn
and the very simple piece of actionscript:
submit_btn.onPress = function () {
loadVariablesNum(“pleasework.php”,0,“POST”);
}
here is the relevant code on the pleasework.php
<?php
$age = $_POST[‘name_var’];
$name = $_POST[‘age_var’];
$address = $_POST[‘address_var’];
submit_btn.onPress = function () {
var please:LoadVars = new LoadVars();
please.name_var;
please.age_var;
please.address_var;
please.sendAndLoad("pleasework.php",0,"POST");
}
I tried the sendAndLoad method,
but am still getting nothing when I go to view the php view in my browser.
all files are stored on the same location on my local apache server (http://localhost). I tried using both the swf and the html containing the swf but still got nothing. Would it have anything to do with the way I am publishing the swf?
Thanks for the help by the way!
register_globals was set to On in my php.ini file.
also, I was only entering text through the swf file on its own,
as opposed to the html file that contained the embedded swf file,
it seemed to work when I did the latter, I dont know if thats expected or not?!