LoadVars-using send to pass a variable from flash to php

Ask a Question related to Macromedia Flash Data Integration, Design and Development.

  1. #1

    Default LoadVars-using send to pass a variable from flash to php

    For the life of me, I've tried everything:
    I've researched LoadVars on Adobe forum, used David Powers' books, googled
    'flash to php', LoadVars, etc. and tried sendAndLoad, send, and using $_POST,
    $_GET, $_REQUEST. $HTTP_POSTVARS but I keep getting this same error. any advice
    please?

    My goal with this simple app is to prototype being able to pass a variable
    from flash to a variable in php.

    Parse error: syntax error, unexpected T_VARIABLE in flash_to_SQL.php on line 5

    Actionscript 2.0 code:

    var c :LoadVars = new LoadVars();
    c.testing = "123FOUR";
    c.send ("http://127.0.0.1/flash_to_SQL.php","_self","POST");

    php code: (I also tried $_POST, $_GET, $_REQUEST. $HTTP_POSTVARS)
    <?php

    //mysql 4.1.2, php 4 , NO mysqli

    ecbo $_REQUEST ['testing'];
    /?>



    MYSCREENNAMEISUNAVAILABLE Guest

  2. Similar Questions and Discussions

    1. How to pass a variable from HTML to Flash 9
      I have built my flash ad banner in Flash 9 and now want the HTML code to pass the url over to the flash movie that it should jump to when clicked. ...
    2. Flash to CFM via loadvars.send()
      Does anyone know when you use loadvarsObj.send("index.cfm","_blank","post") which scope the variables are presented to CF in? I had assumed that...
    3. Flash Forms (Can't pass a variable)
      Hello All, I have a flash form, and it is working ok except for a combo box within the form that is not passing the selection. Any ideas what...
    4. Pass External Variable to Flash
      I have the Flash Menu Tree. from Flash Exchange and it really works well using an externally loaded XML file. I am interested in passing the name of...
    5. Pass String Variable from Flash MX to Director MX
      Is there any way for me to pass a string variable from Flash MX to Director MX? The line of code I'm using in Flash where I'd like to pass the...
  3. #2

    Default Re: LoadVars-using send to pass a variable from flash tophp

    ecbo? shouldn't that be echo? :)
    acframe Guest

  4. #3

    Default Re: LoadVars-using send to pass a variable from flash tophp

    Not sure it is making it to ecbo...
    Jefferator Guest

  5. #4

    Default Re: LoadVars-using send to pass a variable from flash tophp

    var formData:LoadVars = new LoadVars();
    formData.fname = "Name";
    formData.send("http://www.website.com/flash_php.php", formData, "POST");

    <?php
    $name = $_POST['fname'];
    echo $name;
    ?>
    durand Guest

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139