2 Replies Latest reply on Nov 10, 2009 8:41 PM by Turt2

    Flash Form

    Turt2

      Hello all,

       

      I need this done:

       

      A flash file that has 2 input boxes, one called "name" and one called "color"

       

      The name field is self explanitory, the color field is there for a user to submit an idea for a color theme.

       

      I need it to send to a PHP file. The PHP code is below.

       

      <?php
      //deemed useless graphics-wise
      $name = $_POST['name'];
      $colorTheme = $_POST['color'];


      $myFile = "colors.txt";
      $fh = fopen($myFile, 'a') or die("ERROR FILE CANNOT BE WRITTEN");
      $stringData = "Name: ".$name."\nColorChoice: ".$colorTheme."\n";
      fwrite($fh, $stringData);
      fclose($fh);
      ?>

       

      I DO NOT want flash to "pop" open a Firefox, IE, or other web-browser page, i just want it to send the variables, and do the PHP code.

       

      I have tried everything i know, researched, and learned, NONE of it works, PHP gives me the error of:

      ""

      Notice:  Undefined index:  name in <website> on line 3

      Notice:  Undefined index:  color in <website> on line 4

      Notice:  Undefined variable: file in <website> on line 7

      Warning:  fopen() [function.fopen]: Filename cannot be empty in <website> on line 8
      ERROR FILE CANNOT BE WRITTEN

      ""

      for both "name" and "color".

       

      Any and all help is apreciated,

       

      Thank You

       

      ~Turt2