# Flash from problem

**URL:** <https://forum.kirupa.com/t/flash-from-problem/33434>\
**Category:** flash\
**Created:** [October 19, 2003, 10:47am UTC](https://forum.kirupa.com/t/flash-from-problem/33434 "2003-10-19T10:47:14Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![dreamer](https://avatars.discourse-cdn.com/v4/letter/d/6bbea6/32.png) [@dreamer](https://forum.kirupa.com/u/dreamer)\
**Post date:** [October 19, 2003, 10:47am UTC](https://forum.kirupa.com/t/flash-from-problem/33434/1 "2003-10-19T10:47:14Z")

</div>

I have made a form…

and on the submit button i added this code:  
on (release) {  
if (name eq “” || contact eq “” || title eq “” || message eq “” ) {  
info = “Please fill in all fields”;  
stop();  
} else {  
loadVariablesNum(“send.php”, 0, “POST”);  
nextFrame();  
name = “”;  
contact = “”;  
title = “”;  
message = “”;  
info = “”;  
}  
}

The send.php file is like:  
\<?  
$headers = “From: $name”;  
mail("dh@designers-hub.com", “$headers”, “$title”, “$contact”, “$message”);  
?\>

For some reason when it sends it doesn;t send the $message…

Can you fix this or do you know a better code?

---

<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:** [October 19, 2003, 11:02am UTC](https://forum.kirupa.com/t/flash-from-problem/33434/2 "2003-10-19T11:02:07Z")

</div>

Check to see if you gave your message text box the correct variable name.

---

<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:** [October 19, 2003, 11:21am UTC](https://forum.kirupa.com/t/flash-from-problem/33434/3 "2003-10-19T11:21:07Z")

</div>

There are some errors in your PHP file. You’re trying to use a variable like this “$headers”. That won’t use the value of the variable $headers, it will use the string “$headers”. So get rid of the quotes around your variable names.

Same thing for

```php
$headers = "From: $name"

```

, which should be

```php
$headers = "From : ".$name

```

. You might also want to have it jump to the next line, using “  
”.

```php

<? 
$headers = "From: ".$name."
"; 
mail("dh@designers-hub.com", $headers, $title, $contact, $message); 
?>

```

I hope that’s not your entire scipt …

---

<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:** [October 19, 2003, 11:47am UTC](https://forum.kirupa.com/t/flash-from-problem/33434/4 "2003-10-19T11:47:57Z")

</div>

v-

```php
$name = "Voetsjoeba";
echo "My name is $name.";

```

prints My name is Voetsjoeba 🙂

You got the order of the arguments messed up… try this

```php
$name = $_POST['name'];
$contact = $_POST['contact'];
$title = $_POST['title'];
$message = $_POST['message'];

$headers = "From: $name <$contact>";

mail("dh@designers-hub.com", $title, $message, $headers);

```

---

<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:** [October 19, 2003, 11:51am UTC](https://forum.kirupa.com/t/flash-from-problem/33434/5 "2003-10-19T11:51:23Z")

</div>

as I discussed with you in MSN, that’s legal voets…

and you need to check whether REGISTER\_GLOBALS is on… that script won’t work if it is.

change loadVariablesNum(“send.php”, 0, “POST”); , to getURL(“send.php”, “\_blank”, “POST”); , and tell me what the output is.

---

<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:** [October 19, 2003, 11:58am UTC](https://forum.kirupa.com/t/flash-from-problem/33434/6 "2003-10-19T11:58:39Z")

</div>

Lol, I’m such a dummy in PHP 😛 Sorry guys.
