1 Reply Latest reply on Oct 23, 2007 8:20 PM by Sketchsta

    PHP for FORM and SUBMIT

    Mary_Alice
      See my php script below. I have put it on a website that I have designed for a company. For now, I have put my own email address for the form information to come to. However, the form information does not come to my email???? Wondering where the error is in PHP? Would someone kindly help me. Mary Alice And my email is art.design@comcast.net. I have the files in a jpg showing how they look in Flash and in the php file. If you want, you may email me. I just have to solve this php situation. I need the form information coming to my email. Please tell me what is wrong with the Actionscripting or the PHP scripting.

      Regarding the ActionScript 1.0/2.0, this is what I put for the FORM:
      onClipEvent (data) {
      _root.nextFrame();
      }
      -------------------------------------------------------------------------------
      This is what I put for the SUBMIT button:
      onClipEvent (load) {
      form.loadVariables("analysisformphp.php", "POST");
      }
      -------------------------------------------------------------------------------

      And regarding the PHP, I made a separate file for the PHP scripting. It is as follows:

      <?php
      $SendTo = "art.design@comcast.net"
      $subject = "My AnalysisForm Reply";

      $headers = "From: " . $_POST["household"];
      $headers = "From: " . $_POST["water supply"];
      $headers = "From: " . $_POST["softener"];
      $headers = "From: " . $_POST["bottled water"];
      $headers = "From: " . $_POST["comments"];
      $headers = "From: " . $_POST["name/business"];
      $headers = "From: " . $_POST["address"];
      $headers = "From: " . $_POST["city/state/zip"];
      $headers = "From: " . $_POST["phone"];
      $headers .= "<" . $_POST["email"] . ">\r\n";
      $headers .= "Reply-To: " . $_POST["email"] . "\r\n";
      $headers .= "Return-Path: " . $_POST["email"];

      mail(recipient, subject, message, other headers);
      mail($sendTo, $subject, $message, $headers);
      ?>
        • 1. PHP for FORM and SUBMIT
          Sketchsta Level 1
          Hi Mary, your code seems fine from what I can tell. But I'm no PHP guru.
          The first thought that comes to mind is, does the server have PHP support installed? If not, then you can't use PHP as your mail handler. You will need to use some script that is supported, maybe ASP.
          Second thought, are you sending each Input Text field separate to the PHP handler? I dont see that in your AS code, I'm assuming that you have it somewhere else.
          You need to send each field separate and give it a name that your PHP handler will recognise, then it can place it in the BODY of an email.

          I would check that first. If you cant get it to work, and you need this form asap. Here is my form code, which uses PHP as a handler aswell. This works no problems, as you can see HERE

          Here is the code.
          The code coes on a frame instead of the button symbol its self.

          submit_mc is the instance name of your submit button.