3 Replies Latest reply on Jul 15, 2008 6:23 AM by kglad

    Email PHP in flash

    mattyfuse
      Hello flash experts,

      I purchased a started flash template for my site and all is done except I cannot figure out how to use the email.php form within the site. On one of the pages that was already created I have a form with things to enter such as name, email, etc.. When I purchased the package it came with a email.php file that I believe is used to send the form anwsers to my email address. I opened the php file in Opera (in my mac) and saw that there are a few names to change. I changed these so the email would email to my address but it is not working. I am not sure if there is something I am missing or if I am supposed to do something else with the php files? Any help would greatly be appreciated. here is the code with the email.php

      <?

      $destination="you@somedomain.com";

      $name=$_POST['name1'];

      $email=$_POST['email'];

      $company=$_POST['company'];

      $from = 'you@somedomain.com';

      $phone=$_POST['number'];

      $mes=$_POST['message1'];

      $subject="Message from $name" ;

      $header="From: $from\n";

      $mes="Name: $name\n

      Company: $company\n

      Email: $email\n

      Phone: $phone\n

      Comments: $mes\n";

      mail($destination,$subject,$mes,$header); ?>


      and the form on my flash page asks for

      NAME
      EMAIL
      ETc...

      Thanks for the help!!!

      Matt
        • 1. Re: Email PHP in flash
          kglad Adobe Community Professional & MVP
          $destination should be your email address. the variables you send to your php script are in single quotes with the brackets following $_POST and it would be best to use the loadvars class to call your php script (email.php).
          • 2. Re: Email PHP in flash
            mattyfuse Level 1
            thanks kglad

            what is the

            $from = 'you@somedomain.com';

            do I write my email there as well?

            I see the the loadvars class is used in the flash page.

            Is there anything wrong with the php code I listed above???

            I just upload the php file to the server correct?

            Thanks again for your help

            Matt
            • 3. Re: Email PHP in flash
              kglad Adobe Community Professional & MVP
              $from should be one of your email addresses that uses your server's domain.

              there should be a semi-colon at the end of your $mes line

              and the following lines should be removed:


              Company: $company\n

              Email: $email\n

              Phone: $phone\n

              Comments: $mes\n";