Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / Flash / Data Integration / January 2008



Tip: Looking for answers? Try searching our database.

Send an array from Flash 8 to PHP

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
grungie - 14 Jan 2008 04:05 GMT
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.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.