# Php and flash ( problem when hitting enter)

**URL:** <https://forum.kirupa.com/t/php-and-flash-problem-when-hitting-enter/264085>\
**Category:** Uncategorized\
**Created:** [June 23, 2008, 2:15am UTC](https://forum.kirupa.com/t/php-and-flash-problem-when-hitting-enter/264085 "2008-06-23T02:15:29Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![xelaxam](https://avatars.discourse-cdn.com/v4/letter/x/5e9695/32.png) [@xelaxam](https://forum.kirupa.com/u/xelaxam)\
**Post date:** [June 23, 2008, 2:15am UTC](https://forum.kirupa.com/t/php-and-flash-problem-when-hitting-enter/264085/1 "2008-06-23T02:15:29Z")

</div>

I’ve got a problem with my php. It is a simple form with name email and comments. This php is working on flash. The only problem is when the user presse enter on the comments area to change line the rest of the message is not appearing. I mean when I receive the message it is broken I have only the first paragraphe…

Can you help me

here is my php code:

```auto
<?php
if(get_magic_quotes_gpc() == 1){
function remove_magic_quotes(&$array)
{
 foreach($array as $key => $val){
 if(is_array($val)){
   remove_magic_quotes($array[$key]);
  } else if(is_string($val)){
   $array[$key] = stripslashes($val);
  }
 }
}

remove_magic_quotes($_POST);

}

$sendTo = "myemail";
$subject = "Rp";

$headers = "From: " . $_POST["firstName"] ." ". $_POST["lastname"] . "<" . $_POST["email"] .">
";

$headers .= "Reply-To: " . $_POST["email"] . "
";

$headers .= "Return-path: " . $_POST["email"];

$message = $_POST["message"];

mail($sendTo, $subject, utf8_decode($message), $headers);

?>

```

thx

---

<div class="post-metadata">

**Author:** ![xelaxam](https://avatars.discourse-cdn.com/v4/letter/x/5e9695/32.png) [@xelaxam](https://forum.kirupa.com/u/xelaxam)\
**Post date:** [June 23, 2008, 2:25am UTC](https://forum.kirupa.com/t/php-and-flash-problem-when-hitting-enter/264085/2 "2008-06-23T02:25:58Z")

</div>

can it be a server side problem?

---

<div class="post-metadata">

**Author:** ![simplistik](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/simplistik/32/7747_2.png) [@simplistik](https://forum.kirupa.com/u/simplistik)\
**Post date:** [June 23, 2008, 1:39pm UTC](https://forum.kirupa.com/t/php-and-flash-problem-when-hitting-enter/264085/3 "2008-06-23T13:39:55Z")

</div>

ummm might want to check that your input field in flash is set to multi line. outside of that i see no reason to error, nor can i tell you anything else unless it outputs some sort of error code. try running the script w/o flash so you can see the output and see if it runs properly

---

<div class="post-metadata">

**Author:** ![xelaxam](https://avatars.discourse-cdn.com/v4/letter/x/5e9695/32.png) [@xelaxam](https://forum.kirupa.com/u/xelaxam)\
**Post date:** [June 23, 2008, 2:40pm UTC](https://forum.kirupa.com/t/php-and-flash-problem-when-hitting-enter/264085/4 "2008-06-23T14:40:18Z")

</div>

I tried with a new script… Stille the same stuff… in html no problem all worked. So i figured out that the problem is in flash. Th input text is a multiline. It use verdana so no problem for the embed caracter. There is also set to antialiasing for readability.

for the code is a bit simple all my text box (name, email, business, and comments ) are in a movie clip \*webform" which as this code on it:

```auto
onClipEvent(data){
	
	gotoAndPlay("back");
}

```

and a button send outside the movie clip has

```auto
on (press) {
	form.loadVariables("email.php", "POST");
	}

on(release) 
	{gotoAndPlay("back");
}

```

also I activited ounce the html formaing and all was working but I see all the anoying code but all was working perfectly.
