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

    Flash Form


      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.


      //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);


      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


      for both "name" and "color".


      Any and all help is apreciated,


      Thank You