loadVars.send question

Another slightly related variable question:

I am attempting to store data from a flash timeline into a database.

Now, if I use getURL in my AS, the PHP script works just fine and the data is saved. But, I don’t want to pop up a browser window, I just want it to save. So, I created another loadVars object and tried using loadVars.send… but, with this method, no data is ever sent.

when I send via getURL, this is what I send:


When I send via loadvars, this is what I send:

[AS]sendData.send(“http://www.mobcar.com/rbnghof.php?firstName="+firstName+"&lastName="+lastName+"&bandName=”+rbngFinal, “_self”, “GET”);[/AS]

I’m using _self, hoping that if there is an error, it will put it up on the browser. No luck.

Kind of frustrating. I figure if it works one way it should work the other… Especially if the PHP script works and is saving data to mySQL properly using getURL.

i think you can simply use

sendData.send("http://www.mobcar.com/rbnghof.php?", "GET");

Yeah that worked fine. After poring through my code I found that I had a typo when declaring the new loadVars() object, and that’s why it wasn’t working.

But… here’s the thing. Although it’s inserting the data into mySQL, it’s also spawning a new browser window at the same time. I don’t want to so that. I just want to post the data and go on to the next thing on the timeline.

Is there any way to send data so that it is transparent to the user?

i think you should be fine if you use the line i gave you… im not sure though… if not, try using .load… or sendAndLoad… or even loadVariables… :slight_smile:


and in the PHP use $_GET[‘varname’];