PDA

View Full Version : Sending Multiple variables from FLASH to PHP


MaRiO FDZ
05-22-2006, 07:38 AM
Hi

My name is Mario, I'm a COMPLETE NOOB in actionscript and PHP, I've read Jessie's tutorial of sending variables to PHP and back, and I must say they are very helpful. Thanks!!

I want to write into a TXT file using PHP, and I've got no problems at all when I send ONE variable at a time. Problem is that I need to send 4 variables simoultaniously.

So, I did this

data1.sendAndLoad("http://localhost/careTaker.php", response, "post");
data2.sendAndLoad("http://localhost/careTaker.php", response, "post");
data3.sendAndLoad("http://localhost/careTaker.php", response, "post");
data4.sendAndLoad("http://localhost/careTaker.php", response, "post");

I assume it SHOULD write this:

<record title=\"$data1\" descripcion=\"$data2\"<link>$data3</link><keywords>$data1$data2$data3$data4</keywords></record>

and I get this:

<record title="$data1" descripcion=""<link></link><keywords>$data1</keywords></record>
<record title="" descripcion=""<link>$data2</link><keywords>$data2</keywords></record>
<record title="" descripcion="$data3"<link></link><keywords>$data3</keywords></record>
<record title="" descripcion=""<link>$data4</link><keywords>$data4</keywords></record>

I assume its because I call the method 4 times, each with one with a different variable, so it executes all 4 methods one variable at the time....

How do I send all 4 variables at once???

I WOULD BE MUCH OBLIGUED!! THanks in Advance

Take Care