Welcome, Guest
  • Author Topic: Populate Combo Box + AS3 + PHP + MySQL  (Read 13726 times)

    Jorge Solis

    • Global Moderator
    • Systems Administrator
    • *****
    • Posts: 14616
      • View Profile
    Re: Populate Combo Box + AS3 + PHP + MySQL
    « Reply #15 on: 02/03/10, 10:29 »
    Please elaborate your question in a new POST

    Jorge

    JKofSpades

    • Server what's that
    • *
    • Posts: 10
      • View Profile
      • Email
    Re: Populate Combo Box + AS3 + PHP + MySQL
    « Reply #16 on: 02/03/10, 11:31 »
    Hey Jorge,

    I posted a new topic about the problem.

    any Ideas?

    Thankz

    Drivetrain

    • Server what's that
    • *
    • Posts: 1
      • Yahoo Instant Messenger - Drivetrain2010
      • View Profile
      • Email
    Re: Populate Combo Box + AS3 + PHP + MySQL
    « Reply #17 on: 12/28/11, 00:38 »
    Hello Jorge!

    I'm new to the site, and I've looked for the mentioned tutorial, but can't seem to find it...any suggestions / ideas on how I can find it?
    Thanks!

    DT

    Jorge Solis

    • Global Moderator
    • Systems Administrator
    • *****
    • Posts: 14616
      • View Profile
    Re: Populate Combo Box + AS3 + PHP + MySQL
    « Reply #18 on: 12/28/11, 01:54 »
    This is an old POST, I don't recall to mention a tutorial, probably you can quote so I have some clue

    Jorge

    piluth

    • Server what's that
    • *
    • Posts: 1
      • View Profile
      • Email
    Re: Populate Combo Box + AS3 + PHP + MySQL
    « Reply #19 on: 04/03/13, 15:33 »
    I am new using AS3 and PHP and, I am having issues doing this. I mostly copied the code shown in this post for now but, I keep getting this result from AS3 when I test the file.

    Code: [Select]
    Error: Error #2101: The String passed to URLVariables.decode() must be a URL-encoded query string containing name/value pairs.
    at Error$/throwError()
    at flash.net::URLVariables/decode()
    at flash.net::URLVariables()
    at flash.net::URLLoader/onComplete()

    Code: [Select]
    import flash.events.Event;
    import fl.events.ComponentEvent;


    var myData:URLRequest = new URLRequest("test.php");
    myData.method = URLRequestMethod.POST;

    var loader:URLLoader = new URLLoader();
    loader.dataFormat = URLLoaderDataFormat.VARIABLES;
    loader.load(myData);
    loader.addEventListener(Event.COMPLETE, questionOnLoad);

    function questionOnLoad(event:Event) {
    var questions:Array = new Array();
    for (var i:uint=0; i<event.target.data.cant; i++) {
    questions.push({label:event.target.data["question"+i], data:event.target.data["image"+i]});
    }
    cbb_request.dataProvider = new DataProvider(questions);
    cbb_request.dropdownWidth = 210;
    cbb_request.prompt = "Pick Your Question";
    }

    stop();

    My PHP output is:

    question0=Maintenance&image0=Trouble&question1=Maintenance&image1=Trouble&question2=Maintenance&image2=Alarm&question3=Housekeeping&image3=Clean&question4=Housekeeping&image4=Dirty&question5=Security&image5=Crime&question6=Security&image6=Assault&cant=7

    Any idea what is wrong here?

    Thank you!