2 Replies Latest reply on Sep 12, 2006 6:46 AM by wickedwulfy

    Contact Form Not Working - Please HELP!

    wickedwulfy
      Hi there,

      I would be most grateful if anybody could help me with a problem i am having with a flash contact form. The form is located in 'contact us' section here:

      The code from flash and php page is as below:

      Flash Code:

      on(rollOver) {
      this.gotoAndPlay("s1");
      }


      on(rollOut, releaseOutside) {
      //this.gotoAndPlay("s2");
      this.gotoAndPlay(_totalframes - _currentframe);
      }

      on (release) {
      _parent.getURL("contact.php","_blank","GET");
      _parent.t1_2="name";
      _parent.t2_2="email";
      _parent.t3_2="tel";
      _parent.t4_2="comments";
      _parent.t5_2="mobile";
      }




      Code from the PHP page:

      <?php
      $your_name = $_GET['t1_2'];
      $your_email = $_GET['t2_2'];
      $your_tel = $_GET['t3_2'];
      $your_comments = $_GET['t4_2'];
      $your_mobile = $_GET['t5_2'];

      $recipient_email = "wulfy@btinternet.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>Customer Query from Creative Woodwork Web Site</title></head></body><br><br>";
      $content .="Name: <b>" . $your_name . "</b><br>";
      $content .="Email: <b>" . $your_email . "</b><br>";
      $content .="Tel: <b>" . $your_tel . "</b><br>";
      $content .="Mobile: <b>" . $your_mobile . "</b><br>";
      $content .="Comments: <b>" . $your_comments . "</b><br>";
      $content .="<br></body></html>";

      mail($recipient_email,$subject,$content,$headers);
      ?>

      <html>
      <body bgcolor="#d3d6c8">
      <div align="center" style="margin-top:60px;color:#666666;font-size:10px;font-family:verdana">
      Your message has been sent. <br>Thank you.<br><br> We will contact you ASAP.
      </div>
      </body>
      </html>
      <script>resizeTo(300,300)</script>




      Thanks very much in advance for any help. This is driving me nuts.
      :-)
        • 1. Re: Contact Form Not Working - Please HELP!
          Hi, it may seem like a daft question but does your web hosting support php4? I recently had to upgrade my hosting to accomodate php4 because of the same problem. Im not advanced enough to comment on your code but on my mailform.php the code is:

          <?

          $adminaddress = "enquiries@nicedicedesign.com";
          $siteaddress =" http://www.nicedicedesign.com";
          $sitename = "NiceDice Design";

          //No need to change anything below ...
          // Gets the date and time from your server
          $date = date("m/d/Y H:i:s");

          // Gets the IP Address
          if ($REMOTE_ADDR == "") $ip = "no ip";
          else $ip = getHostByAddr($REMOTE_ADDR);

          // Gets the POST Headers - the Flash variables
          $action = $HTTP_POST_VARS['action'] ;
          $email = $HTTP_POST_VARS['email'] ;
          $name = $HTTP_POST_VARS['name'] ;
          $comments = $HTTP_POST_VARS['comments'] ;

          //Process the form data!
          // and send the information collected in the Flash form to Your nominated email address

          if ($action == "send") {
          //
          mail ("$adminaddress","Info Request",
          "A visitor at $sitename has left the following information\n
          Name: $name
          Email: $email\n
          The visitor commented:
          ------------------------------
          $comments

          Logged Info :
          ------------------------------
          Using: $HTTP_USER_AGENT
          Hostname: $ip
          IP address: $REMOTE_ADDR
          Date/Time: $date","FROM:$adminaddress" ) ;

          //This sends a confirmation to your visitor
          mail ("$email","Thank You for visiting $sitename",
          "Hi $name,\n
          Thank you for your interest in $sitename!\n
          We will contact you as soon as possible.\n
          Cheers,\n
          Duncan\n
          $sitename
          $siteaddress","FROM:$adminaddress") ;

          //Confirmation is sent back to the Flash form that the process is complete
          $sendresult = "Thank you. You will receive a confirmation email shortly.";
          $send_answer = "answer=";
          $send_answer .= rawurlencode($sendresult);
          echo $send_answer;
          } //


          ?>

          I suppose it could be altered to fit.
          Hope it helps and not confuses!
          Cheers
          • 2. Re: Contact Form Not Working - Please HELP!
            wickedwulfy Level 1
            Thanks for you reply. Yes PHP4 is enabled.

            Any solutions to my orginal question from users would be much appreciated.

            Thanks. Thank. Thanks.