# Input text passing extra info to PHP

**URL:** <https://forum.kirupa.com/t/input-text-passing-extra-info-to-php/300583>\
**Category:** flash\
**Created:** [November 24, 2009, 2:56am UTC](https://forum.kirupa.com/t/input-text-passing-extra-info-to-php/300583 "2009-11-24T02:56:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![thegrrraue](https://avatars.discourse-cdn.com/v4/letter/t/b4bc9f/32.png) [@thegrrraue](https://forum.kirupa.com/u/thegrrraue)\
**Post date:** [November 24, 2009, 2:56am UTC](https://forum.kirupa.com/t/input-text-passing-extra-info-to-php/300583/1 "2009-11-24T02:56:20Z")

</div>

So I’m building a little contact form in flash and it works, but it is passing along all of the font styling information into the email sent to the client. Kind of annoying. I want it just to send the plain text.

Here’s what I’m using:

This code is in the actionscript, picking up the input text fields and posting them to the PHP file. It also tells a status box to update with current info:

```auto
loadVariables("send_email.php?flashmo=" + random(1000), this, "POST");
message_status.text = "sending...";
var i = 0;
function check_status()
{
	if( success == "yes" )
	{
		message_status.text = "Your message was sent successfully!";
		play();
	}
	else if( success == "no" )
	{
		message_status.text = "Your message could not be sent. Please try again.";
		gotoAndStop("stop");;
	}
	if( i >= 20 )
		clearInterval(interval_id);
	i++;
}
var interval_id = setInterval(check_status, 400);

```

This is the PHP form:

```auto
<?php
$contact_name = $_POST['name'];
$contact_email = $_POST['email'];
$contact_phone = $_POST['phone'];
$contact_message = $_POST['message'];

if( $contact_name == true )
{
	$sender = $contact_email;
	$receiver = "chris.graue@gte.net";
	$client_ip = $_SERVER['REMOTE_ADDR'];
	$email_body = "Name: $contact_name 
Email: $sender 
Subject: $contact_phone 
Message: $contact_message 
IP: $client_ip 
Flash contact form from La Bella website";		
	$extra = "From: $sender
" . "Reply-To: $sender 
" . "X-Mailer: PHP/" . phpversion();

	if( mail( $receiver, "Flash Contact Form La Bella - $phone", $email_body, $extra ) ) 
	{
		echo "success=yes";
	}
	else
	{
		echo "success=no";
	}
}
?>

```

And this is the email I receive:

> Name: \<P ALIGN="LEFT"\>\<FONT FACE="Helvetica Neue" SIZE="12" COLOR="#492F92" LETTERSPACING="0" KERNING="0"\>Some Jerk\</FONT\>\</P\>  
> Email: \<P ALIGN="LEFT"\>\<FONT FACE="Helvetica Neue" SIZE="12" COLOR="#492F92" LETTERSPACING="0" KERNING="0"\>jerkemail@email.com\</FONT\>\</P\>  
> Subject: \<P ALIGN="LEFT"\>\<FONT FACE="Helvetica Neue" SIZE="12" COLOR="#492F92" LETTERSPACING="0" KERNING="0"\>The subject!!!\</FONT\>\</P\>  
> Message: \<P ALIGN="LEFT"\>\<FONT FACE="Helvetica Neue" SIZE="12" COLOR="#492F92" LETTERSPACING="0" KERNING="0"\>\</FONT\>\</P\>\<P ALIGN="LEFT"\>\<FONT FACE="Helvetica Neue" SIZE="12" COLOR="#492F92" LETTERSPACING="0" KERNING="0"\>asdfs saf as fsa fsd \</FONT\>\</P\>  
> IP: 76.95.45.131  
> Flash contact form from La Bella website

Any thoughts?
