0 Replies Latest reply on May 12, 2009 8:38 PM by Meb Moon

    GoDaddy PHP Flash Contact Form Woes...

    Meb Moon

      Hello! 

      I hope someone can help me.

       

      I also having terrible problems getting my Mailing List Subscription form to work on my Flash Site. I'm also with Godaddy and they have basically been zero help so far. I'm using CS3 and AS 2.0.

       

      My form just has 2 fields for name and email and then a submit button. The strange thing is that the way I have it now, I am able to receive the subscription emails if I test it locally from within Flash. But, as soon as I upload it to Godaddy it stops working! What's up with that?

       

      However, even though when I test it from within Flash and receive the email, the "success" or "failed" response part still doesn't work for my form.

       

      I've spent so many hours on this... Please help!


      Here's my PHP:

      <?PHP

      ini_set('SMTP', 'relay-hosting.secureserver.net');

      $theName = $_POST['theName'];
      $theEmail = $_POST['theEmail'];

      $to  = 'contact@website.com' . ', ';

      $subject = "Newsletter Subscription";
      $message = "Name: " .$theName;
      $message .= PHP_EOL . PHP_EOL ."Email: $theEmail";
      $headers = "From: $theEmail";
      $headers .= "\rReply-To: $theEmail";


      $sentOk = mail($to,$subject,$message,$headers);

      echo "sentOk=" . $sentOk;

      ?>


      and here's my AS 2:

      stop();

      var senderLoad:LoadVars = new LoadVars();
      var receiveLoad:LoadVars = new LoadVars();

      sender.onRelease = function() {
      senderLoad.theName = theName.text;
      senderLoad.theEmail = theEmail.text;
      senderLoad.sendAndLoad("http://www.website.com/send.php",receiveLoad, "POST");
      }

      receiveLoad.onLoad = function() {
      if(this.sentOk) {
      _root.gotoAndStop("success");
      }
      else {
      _root.gotoAndStop("failed");
      }
      }

      theName.tabIndex = 1;
      theEmail.tabIndex = 2;