0 Replies Latest reply on Apr 25, 2007 8:46 PM by bbaer

    Using PHP with Flash (contact form)

    bbaer
      I am trying to get a contact form on a flash site to work and for some reason the PHP isn't forwarding the message to my email. Below is the flash code I have used as well as the document I have saved as contact.php. Thank you so much for the help. This is the last thing I need to complete for the site and I just can't seem to get it right. Thanks.

      Flash Code For the Submit Button:

      onClipEvent (enterFrame) {
      if (this.hitTest(_root._xmouse, _root._ymouse, true)) {
      if (this._currentframe<this._totalframes) {
      this.nextFrame();
      }
      } else {
      if (this._currentframe>1) {
      this.prevFrame();
      }
      }
      }
      on (release) {
      this._parent.getURL ("contact.php","_blank","GET");
      this._parent.name = "Your Name:";
      this._parent.email = "Your Email:";
      this._parent.phone = "Your Phone Number:";
      this._parent.text4 = "e-mail:";
      this._parent.message = "Your Message:";
      }



      Here is what I have for Contact.php:
      <?php

      $your_name = $_GET['name'];
      $your_email = $_GET['email'];
      $your_phone = $_GET['phone'];
      $your_message = $_GET['message'];

      $recipient_email = "info@dreammediaweddings.com";

      $subject = "from " . $your_email;
      $headers = "From: " . $your_name . "<" . $your_email . ">\n";
      $headers .= 'Content-type: text/html; charset=iso-8859-1';

      $content = "<html><head><title>Contact letter</title></head><body><br>";
      $content .= "Name: <b>" . $your_name . "</b><br>";
      $content .= "E-mail: <b>" . $your_email . "</b><br><hr><br>";
      $content .= "Phone: <b>" . $your_phone . "</b><br>";
      $content .= $your_message;
      $content .= "<br></body></html>";

      mail($recipient,$subject,$content,$headers);
      ?>
      <html>
      <body bgcolor="#282E2C">
      <div align="center" style="margin-top:60px;color:#FFFFFF;font-size:11px;font-family:Tahoma;font-weight:bold">
      Your message was sent. Thank you.
      </div>
      </body>
      </html>
      <script>resizeTo(300, 300)</script>