A Flash Developer Resource Site

View Poll Results: Which is most secure and I should use?

Voters
3. You may not vote on this poll
  • SendAndLoad with GET

    0 0%
  • SendAndLoad with POST

    2 66.67%
  • Load with either

    1 33.33%
  • loadVariables with either

    0 0%
Results 1 to 3 of 3

Thread: PHP reading in flash

  1. #1
    the cheesy child bounceboy's Avatar
    Join Date
    Dec 2008
    Location
    Australia
    Posts
    323

    PHP reading in flash

    Ok, I get confused over this simple question all the time.

    so I want to send variables to a PHP document to process and all.

    in the PHP document it gets the variables I used with $_REQUEST

    anyways how do I send the variables to the PHP document? SEVERAL WAYS.

    here's one way:

    load = new LoadVars();
    load.stuff = 1;
    load.sendAndLoad("stuff.php",load,"GET");

    or

    load.sendAndLoad("stuff.php",load,"POST");

    I make it send and then load again so that I get a response.

    i can also use this way:

    load.load("stuff.php")

    does it work the same?

    also I see this alot and it has worked before for me in flash CS3 (AS 2.0):

    loadVariables("load.php")

    yeah sometimes I get confused on which one is most secure and which i should use to send variables.

    so which out of the 4 should I use?

  2. #2
    Bearded (M|G)od MyFriendIsATaco's Avatar
    Join Date
    Dec 2002
    Location
    Awesomeville.
    Posts
    3,045
    It really depends on what you need to do. sendAndLoad & just load obviously serve different purposes. sendAndLoad involves sending variables as well as loading the response. load just... loads the document. There's also just a send method to send the variables and ignore the response.

    You should avoid the old-school loadVariables. You don't have the control like you do with LoadVars.

    And POST is much more secure than GET. Still not "secure" by any means, but it's the best out of the basic HTTP protocol.

  3. #3
    the cheesy child bounceboy's Avatar
    Join Date
    Dec 2008
    Location
    Australia
    Posts
    323
    Ok, thanks man. I'll stick to SendAndLoad because I would like a response. and Ok, I will use POST which I always heard was better.

    thanks one again, you are an exact example of all the kind flashkit members willing to help everybody out with their time.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center