0 Replies Latest reply on Aug 27, 2008 8:14 AM by collosal-G

    Flash and PHP

    collosal-G Level 1
      I am having the hardest time getting the Flash sendAndLoad function to work with a PHP script I have. I have used this script in the past, and it has worked perfectly, though I think the problem may lie in the PHP code.

      Can anyone please help?

      Thanks
      g.

      Flash Code
      function submitForm () {
      // Set Variables
      myVars.title = title;
      myVars.firstName = firstName;
      myVars.lastName = lastName;
      myVars.specialty = specialty;

      myVars.address1 = address1;
      myVars.address2 = address2;
      myVars.city = city;
      myVars.state = state;
      myVars.zip = zip;
      myVars.phone = phone;
      myVars.email = email;

      myVars.asc1 = asc1;
      myVars.asc2 = asc2;
      myVars.asc3 = asc3;

      myVars.typeCases = vcfCases;
      myVars.caseNum = osteoporoticNum;

      myVars.sendAndLoad("../php/regForm.php", myVars, "POST");
      }


      PHP Code
      <html>
      <head><title>Registration Form</title></head>
      <body>
      <?php

      // Parse Flash Vars
      foreach ($_POST as $key => $value) {
      $$key = $value;
      }

      // Client Email Address
      // $email_recipient="email@address.com";

      // Client Subject Line
      $subject_recipient=" My Certification";

      // Client Intro Message
      $message_recipient="My Certification Completed by ".$firstName." ".$lastName;


      // Customer Reply Subject line
      $subject_sender="My Certification";

      // Customer Reply Message
      $message_sender="Thank you for completing the Certification Process.";


      // Do Not Touch
      $message=str_replace("\\\"","\"",$message);
      $message=str_replace("\'","'",$message);
      urlencode ($text);
      $message=str_replace("%0D","\n",$message);

      // Message
      $inhalt=$message_recipient."\n\n"."Name: ".$title." ".$firstName." ".$lastName."\n\n"."Specialty: ".$specialty."\n\n"."Address: ".$address1."\n".$address2."\n".$city." ".$state.", ".$zip."\n\n"."Phone Number: ".$phone."\n"."Email Address: ".$email."\n\n"."Affiliated ASC: ".$asc1."\n".$asc2."\n".$asc3."\n\n"."What type of cases do you perform? ".$typeCases."\n\n"."How many cases do you perform every month? ".$caseNum;


      // Email Responder
      mail($email_recipient,$subject_recipient,$inhalt,"From: ".$email);
      mail($_REQUEST["email"],$subject_sender,$message_sender,"From: ".$email_recipient);

      ?>
      </body>
      </html>