3 Replies Latest reply on Feb 25, 2008 4:02 AM by exPluda?

    Line breaks deleted when Flash variables sent to PHP

    finalcutexpress Level 1
      Hi all -

      I have a designed a Flash based interface to send email via PHP.

      I capture the variables in Flash using:

      var my_lv:LoadVars=new LoadVars();
      // ...
      // ...

      My PHP reads:


      $headers = "From: " . $_POST["name"];
      $headers .= "<" . $_POST["from"] . ">\r\n";
      $headers .= "Reply-To: " . $_POST["from"] . "\r\n";
      $headers .= "Return-Path: " . $_POST["from"];

      $to = $_POST['to'];
      //NOTE: I tried $message without stripslashes - same results
      mail($to, $subject, $message, $headers);


      When the message is received all line breaks using RETURN/ENTER in Flash message .swf are deleted making the message one long line when viewed by the recipient. Is there something I need to write into my actionscript/php to allow the message to recognize these hard line breaks and display properly in the recipient's email client? I'm guessing (hoping!) it's an easy fix. BTW, the messages do display properly in 'some' clients and not others. I need some fix that will correct this across the board.

      Thanks in advance -