Hi guys.
I am using flash 8 and actionscript 2
I have created an array in flash to send to php using getURL and POST.
i.e.
on (release) {
var id:Array = new Array();
id.txt_4 = 'nopanels';
id.txt_2 = 'xheight';
id.txt_3 = 'xwidth';
id.txt_1 = 'colortext';
id.txt_5 = 'shutterstyle';
id.txt_7 = 'finish';
id.txt_6 = 'squarearea';
getURL("test.php", "_self", "POST");
}
Then I am trying to receive the array in a php file called 'test.php' and
print it to test that it works.
i.e.
<?php
//incoming data
$id['txt_4'] = $_POST['id']['txt_4'];
$id['txt_2'] = $_POST['id']['txt_2'];
$id['txt_3'] = $_POST['id']['txt_3'];
$id['txt_1'] = $_POST['id']['txt_1'];
$id['txt_5'] = $_POST['id']['txt_5'];
$id['txt_7'] = $_POST['id']['txt_7'];
$id['txt_6'] = $_POST['id']['txt_6'];
//display
print $id['txt_4'];
print $id['txt_2'];
print $id['txt_3'];
print $id['txt_1'];
print $id['txt_5'];
print $id['txt_7'];
print $id['txt_6'];
?>
I am trying to make it 'register globals = off' compatible.
Any help is appreciated. :confused;
GenaroRG - 15 Jan 2008 23:59 GMT
use the loadVars object. In the code above you are not making any reference to your variables when using getURL. You can't use getURL for this one, you need to use LoadVars
MYSCREENNAMEISUNAVAILABLE - 22 Jan 2008 23:17 GMT
See my post above (migrating mySQL from localhost to server).
The best advice anybody gave me on this forum was to get the book "PHP5 for
Flash" by David Powers. (Friends of Ed- publisher who also has a website) It
has numerous examples and details and can do more than a quick reply on this
forum.