1 Reply Latest reply on Apr 26, 2006 1:42 PM by Newsgroup_User

    form trouble

    hutch-diggens
      hey there...


      I am trying to make a form in flash, with input text boxes, name, email, phone, subject, and description. Ok, now i found a tutorial on this and I have swapped out the original imput movie clip with my own. And on the .php file when i add
      $phone = $_POST["phone"];
      name, and email

      it doesn't work.

      But when i leave it alone, with just the two--subjects and description--it works.

      do you have any suggestions????

      I attached the php file if you wish to check them out.
        • 1. Re: form trouble
          Level 7
          >>And on the .php file when i add $phone = $_POST; name, and email it
          >>doesn't work.


          That $phone = $_POST; does not look like valid PHP to me.

          Perhaps $phone = $_POST['phone'];

          Call the PHP script using http:// line to see what errors PHP might be
          throwing assuming the error feature is on for your PHP server.

          Personally I like to use $_REQUEST['phone']


          --
          Lon Hosford
          www.lonhosford.com
          May many happy bits flow your way!
          "hutch-diggens" <webforumsuser@macromedia.com> wrote in message
          news:e2li2q$b1e$1@forums.macromedia.com...
          hey there...


          I am trying to make a form in flash, with input text boxes, name, email,
          phone, subject, and description. Ok, now i found a tutorial on this and I
          have
          swapped out the original imput movie clip with my own. And on the .php file
          when i add
          $phone = $_POST;
          name, and email

          it doesn't work.

          But when i leave it alone, with just the two--subjects and description--it
          works.

          do you have any suggestions????

          I attached the php file if you wish to check them out.

          <?php
          /***************************************************\
          * PHP 4.1.0+ version of email script. For more
          * information on the mail() function for PHP, see
          * http://www.php.net/manual/en/function.mail.php
          \***************************************************/


          // First, set up some variables to serve you in
          // getting an email. This includes the email this is
          // sent to (yours) and what the subject of this email
          // should be. It's a good idea to choose your own
          // subject instead of allowing the user to. This will
          // help prevent spam filters from snatching this email
          // out from under your nose when something unusual is put.

          $sendTo = "htrain26@yahoo.com";
          $subject = "My Flash site reply";

          // variables are sent to this PHP page through
          // the POST method. $_POST is a global associative array
          // of variables passed through this method. From that, we
          // can get the values sent to this page from Flash and
          // assign them to appropriate variables which can be used
          // in the PHP mail() function.


          // header information not including sendTo and Subject
          // these all go in one variable. First, include From:
          $headers = "From: " . $_POST["firstName"] ." ". $_POST["lastname"] . "<" .
          $_POST["email"] .">\r\n";
          // next include a replyto
          $headers .= "Reply-To: " . $_POST["email"] . "\r\n";
          // often email servers won't allow emails to be sent to
          // domains other than their own. The return path here will
          // often lift that restriction so, for instance, you could send
          // email to a hotmail account. (hosting provider settings may vary)
          // technically bounced email is supposed to go to the return-path email
          $headers .= "Return-path: " . $_POST["email"];

          // now we can add the content of the message to a body variable
          $subjects = $_POST["subjects"];
          $description = $_POST["description"];


          // once the variables have been defined, they can be included
          // in the mail function call which will send you an email
          mail($sendTo, $subject, $subjects, $description, $headers);

          ?>