5 Replies Latest reply on May 12, 2008 5:22 PM by brian914

    Flash/PHP form help

    brian914 Level 1
      I have posted this before a while back, but never figured it out. I think I am really close.
      When my form gets clicked, the following gets triggered:

      var result_lv:LoadVars = new LoadVars();
      result_lv.onLoad = function(success:Boolean) {
      if (success) {
      this.tf_showAlertMsg.text = "Thank you for sending us an email";
      } else {
      this.tf_showAlertMsg.text = "Email did not go through";
      }
      };

      var send_lv:LoadVars = new LoadVars();
      send_lv.Name = tName;
      send_lv.FromEmail = tEmail;
      send_lv.Subject = tSubject;
      send_lv.Comments = tMsg;
      send_lv.Newsletter = tCheckBox;

      send_lv.status = "";
      send_lv.sendAndLoad("php/sendContact.php",result_lv,"POST");
      this.showAlertMsg("Sending...");



      Everything gets sent and all is working great. The only thing that does not work is the ifStatement in the result_lv never gets triggered. I think that this has to do with my php. I don't really speak php and so I am having issues with it.
      In the php I have two echos, which I was told I could use with the result_lv. I think that my result_lv, does either not know what it is listening to, or that my echos are wrong. The echos in the php look like this.

      //if($debug)
      echo "mes1 $ToEmailType $ToEmail $Subject $Message From: $Name $FromEmail\n ";

      and

      echo "&Status=Your quote request has been sent.";



      What do I have to do, so Flash receives the echo and I can tell the user that the info has been received.

      Thanks a lot for help with this!