Send simple form data to php

Hmm,

Simply need to pass for data to PHP and I cannot figure out how… What do I need to do to hit a php file?


            private function submitLogin(eventObj:MouseEvent):void {
                Alert.show("Submitting Data");
                var myData:URLRequest = new URLRequest("save.php")
                myData.method = URLRequestMethod.POST
                var variables:URLVariables = new URLVariables()
                variables.Title = "Test";
                myData.data = variables
                var loader:URLLoader = new URLLoader()
                loader.dataFormat = URLLoaderDataFormat.VARIABLES
                loader.load(myData)
            }  

How do I actually send the data?

Any links would be awesome…

TIA

edit: it appears that the save.php isn’t being called… I have no idea why.

Ok that actually works, my mail server is just slow :lol:

Haha, I’ve tried debugging that sort of thing before only to realize it was just taking forever. :lol:

Yeah I’m like wait this should be exactly as if I was doing it in Flash so why is it not working… Oh well…

btw - now that I know some AS 3 flex is way cool. I tried using it before without any AS 3 knowledge and didn’t get very far. Do you use it at all?

It’s definitely way cool for certain things. I’ve used it a bit, just to get a feel for it more than anything else. It feels a little restrictive to me, and where I feel like I can accomplish almost anything within Flash in a good object oriented fashion, the benefits seem sort of minimal to me - especially when working with designers who like to lay out assets for me in shared Flash libraries.

I really probably haven’t used it enough to see all the benefits.

Biggest benefit is flexible layout in online apps. I used to spend a ton of time laying things out, making sure things moved if the window was resized. Flex does it all for me, it’s not great for extremely free-form stuff, but the layout engine is gold as far as I’m concerned.