# \[php\] not sending variables

**URL:** <https://forum.kirupa.com/t/php-not-sending-variables/65277>\
**Category:** programming\
**Created:** [September 24, 2004, 4:06pm UTC](https://forum.kirupa.com/t/php-not-sending-variables/65277 "2004-09-24T16:06:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tedc](https://avatars.discourse-cdn.com/v4/letter/t/5fc32e/32.png) [@tedc](https://forum.kirupa.com/u/tedc)\
**Post date:** [September 24, 2004, 4:06pm UTC](https://forum.kirupa.com/t/php-not-sending-variables/65277/1 "2004-09-24T16:06:14Z")

</div>

Hi. I am trying to send a form from flash mx 04 over to a mail script that I did in PHP. When I send the variables through flash by GET I get this output:

include/form.php?phone=%2B34+934%2D360%2D698&company=tedc%40casamidy2Ecom&text=I+have+no+message&mail=None&name=Ted+Conn

So therefore I am sending the variables right…

$phone  
$company  
$mail  
$name  
$text

ok so then I change it to send the variables from flash by post of course (the get was only so I could see them)… then include/form.php is like this:

```php

<?
$name = $_POST['name'];
$email = $_POST['email'];
$company = $_POST['company'];
$comments = $_POST['text'];

$message="<b>Name:</b> $name <br> <b>Email:</b> $email<br> <b>Company:</b> $company<br><br> <i>$comments</i>
$message=nl2br($message);
$headers ="MIME-Version: 1.0
";
$headers.="X-Mailer: (".$_SERVER['REMOTE_ADDR'].")
";
$headers.= "Content-type: text/html; charset=iso-8859-1
";
$headers.= "From: ".$Name." <".$Email.">
";
$to="ted@tedconn.com";
$subject= "ChamberlainNY Web Contact Form";
if (!mail($to, $subject, $message, $headers))
   echo "Error sending mail";

?>

```

So it should get the email right at [ted@tedconn.com](mailto:ted@tedconn.com)? Am I doing something terribly wrong? Is my question in the wrong forum? :h: :h: :h:

thank you very much for any help, this last stupid detail is keeping me from getting my commission…

Ted

edit: I just realized that the mail variable is wrong, but it should still send!

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 24, 2004, 6:20pm UTC](https://forum.kirupa.com/t/php-not-sending-variables/65277/2 "2004-09-24T18:20:01Z")

</div>

How come your using “GET” and not “POST”?

[http://www.flash-db.com/Tutorials/saving/](http://www.flash-db.com/Tutorials/saving/)

Give that a read, it should clear things up, not sure why your not getting the mail though.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [September 24, 2004, 6:25pm UTC](https://forum.kirupa.com/t/php-not-sending-variables/65277/3 "2004-09-24T18:25:39Z")

</div>

> [@Digitalosophy](#):
>
> How come your using “GET” and not “POST”?

I am using POST, I just use get in flash so that I can see when I get the file not found error so I can see the output and how the vars are going over, then I make it post and publish it…

Ted
