# PHP & Flash MX mail form trouble

**URL:** <https://forum.kirupa.com/t/php-flash-mx-mail-form-trouble/20238>\
**Category:** programming\
**Created:** [May 6, 2003, 7:44pm UTC](https://forum.kirupa.com/t/php-flash-mx-mail-form-trouble/20238 "2003-05-06T19:44:29Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ryall](https://avatars.discourse-cdn.com/v4/letter/r/53a042/32.png) [@Ryall](https://forum.kirupa.com/u/Ryall)\
**Post date:** [May 6, 2003, 7:44pm UTC](https://forum.kirupa.com/t/php-flash-mx-mail-form-trouble/20238/1 "2003-05-06T19:44:29Z")

</div>

Ok, I’ve made mail forms in flash 5 before and they all worked fine… but for some reason I cannot get this one to work to save my life… I’ve gone through the threads on this topic, but to no avail. I’ve attached the .fla - none of the PHP scripts I’ve been writing worked so I’d like some one to help me start a new one from scratch.

Basically all I want is an email sent to a preset address containing the info provided by the form.

Here is the PHP script I am currently working on… but making so many different ones I’ve gotten cunfused I guess.

```php
<?
$to = "rwalsh@grafikdesigns.com";
$subject = "Request For Order";
$name = $_POST['name'];
$address = $_POST['address'];
$city = $_POST['city'];
$phone = $_POST['phone'];
$email = $_POST['email'];
$rentalDate = $_POST['rentalDate'];
$jumpType = $_POST['jumpType'];
$comments = $_POST['comments'];

$message .= "Order Request From $name <$email> 
";
$address .= "Address: $address
$message .= "Jump Type: $jumpType 
";
$header = "From: $name <$email>";
$message = "$comments 
";

mail($to, $subject, $message, $header);

?>

```

[ORDER FORM .FLA](http://www.grafikdesigns.com/orderForm.fla)

Any suggestions on this code or an entirely new idea would be great.

Peace

---

<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:** [May 6, 2003, 8:58pm UTC](https://forum.kirupa.com/t/php-flash-mx-mail-form-trouble/20238/2 "2003-05-06T20:58:38Z")

</div>

check out this thread … this is where i figured out how to do it.  
[http://www.kirupaforum.com/forums/showthread.php?s=&threadid=17623](http://www.kirupaforum.com/forums/showthread.php?s=&threadid=17623)

if you still can’t figure it out i can give you my source, although i’m pretty sure it’s all in that thread if you read through it.

i don’t know php really so i can’t really help beyond that. i understand how it interacts with flash, but as far as coding it, i’m a newb =)

hope this helps

---

<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:** [May 6, 2003, 10:00pm UTC](https://forum.kirupa.com/t/php-flash-mx-mail-form-trouble/20238/3 "2003-05-06T22:00:36Z")

</div>

If you just copied and pasted the code then there was an error. I fixed it. try it now.

```php

<?
$to = "rwalsh@grafikdesigns.com";
$subject = "Request For Order";
$name = $_POST['name'];
$address = $_POST['address'];
$city = $_POST['city'];
$phone = $_POST['phone'];
$email = $_POST['email'];
$rentalDate = $_POST['rentalDate'];
$jumpType = $_POST['jumpType'];
$comments = $_POST['comments'];

$message .= "Order Request From $name <$email> 
";
$address .= "Address: $address";
$message .= "Jump Type: $jumpType 
";
$header = "From: $name <$email>";
$message .= "$comments 
";

mail($to, $subject, $message, $header);

?>

```

---

<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:** [May 6, 2003, 10:00pm UTC](https://forum.kirupa.com/t/php-flash-mx-mail-form-trouble/20238/4 "2003-05-06T22:00:50Z")

</div>

oh, and repost the FLA because I can’t download that one for some reason.

---

<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:** [May 6, 2003, 10:18pm UTC](https://forum.kirupa.com/t/php-flash-mx-mail-form-trouble/20238/5 "2003-05-06T22:18:53Z")

</div>

Hey Jubba thanks… try the link in the first post now for the .fla… for some reason it wont download auto from my server (I’ll have to look into this), but you can right click and save target as… (be sure to make the extension fla, my computer kept trying to save it as an html file - man I guess theres always something to deal with).

Let me know what you find out by looking at my fla

Peace

---

<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:** [May 6, 2003, 10:41pm UTC](https://forum.kirupa.com/t/php-flash-mx-mail-form-trouble/20238/6 "2003-05-06T22:41:24Z")

</div>

was that link to jubbas tut? Thats one to check out. Im a little late into this but I thought Id throw that out there (and jubba’s already entered the fray so I guess really I have no business here ;))

---

<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:** [May 6, 2003, 10:50pm UTC](https://forum.kirupa.com/t/php-flash-mx-mail-form-trouble/20238/7 "2003-05-06T22:50:04Z")

</div>

yeah I looked at jubbas tut, plus a bunch of threads where he helped people out with similar ?'s but I haven;t had success yet. I think I’ve written and rewritten the code and fla so many different ways that I have my head tied in a knot, I think I just need some one-on-one with someone to help me get this working. It is a great tut though, I just cant seem to tweak it to work for me. grrrrr well practice makes perfect in trying to learn PHP!

Peace 😛

---

<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:** [May 6, 2003, 10:54pm UTC](https://forum.kirupa.com/t/php-flash-mx-mail-form-trouble/20238/8 "2003-05-06T22:54:56Z")

</div>

the more of this you go through, the more adept you will be in the end. Its a hassel at first, but it will pay off when this kind of experience makes more knowledgable about this kind of stuff.

---

<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:** [May 8, 2003, 7:40pm UTC](https://forum.kirupa.com/t/php-flash-mx-mail-form-trouble/20238/9 "2003-05-08T19:40:28Z")

</div>

hey Jubba were you able to look at my .fla??

---

<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:** [May 8, 2003, 9:57pm UTC](https://forum.kirupa.com/t/php-flash-mx-mail-form-trouble/20238/10 "2003-05-08T21:57:13Z")

</div>

nope I forgot about this thread because I’ve been busy lately. I will be able to take a look tomorrow night after all my papers are in…

---

<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:** [May 10, 2003, 7:42am UTC](https://forum.kirupa.com/t/php-flash-mx-mail-form-trouble/20238/11 "2003-05-10T07:42:18Z")

</div>

thanks man!

I’ve been messing with it, but without results yet… I’ll let you know if anything changes - looking forward to hearing what you have to say about it all…

Peace, and thanks again.

---

<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:** [May 11, 2003, 2:47am UTC](https://forum.kirupa.com/t/php-flash-mx-mail-form-trouble/20238/12 "2003-05-11T02:47:57Z")

</div>

Hey Jubba, I notice a “.” beffore your “=” sign. what’s that supposed to do?

---

<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:** [May 11, 2003, 2:52am UTC](https://forum.kirupa.com/t/php-flash-mx-mail-form-trouble/20238/13 "2003-05-11T02:52:42Z")

</div>

I’ve been making contact forms like these before and it’s great. But I’m bored. I want to convert the message sent to my inbox to HTML so I can add colors tables the like. But how can I do this. At first I thought it was easy to do using only HTML but I was wrong. It never worked I just receive the mail with all the HTML tag visible! Anyone knows how to do this?

---

<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:** [May 11, 2003, 6:00pm UTC](https://forum.kirupa.com/t/php-flash-mx-mail-form-trouble/20238/14 "2003-05-11T18:00:04Z")

</div>

It depends on your mail server… it has to support html, some don’t so no matter what you will be able to see the tags - thats all I really know on the subject

---

<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:** [May 11, 2003, 6:05pm UTC](https://forum.kirupa.com/t/php-flash-mx-mail-form-trouble/20238/15 "2003-05-11T18:05:32Z")

</div>

Ryall, its still not letting me download it. I download it and save it as a .fla but Flash refuses to open it up.

---

<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:** [May 12, 2003, 6:57pm UTC](https://forum.kirupa.com/t/php-flash-mx-mail-form-trouble/20238/16 "2003-05-12T18:57:43Z")

</div>

hmmmm I dunno what the deal is… try this link:

[www.grafikdesigns.com/JUBBA/orderForm.fla](http://www.grafikdesigns.com/JUBBA/orderForm.fla)

I updated the file and made sure it downloaded from a few different computers… let me know if it works.

Peace

PS. again you have to save it, and on some computers it is still attempting to be saved as a html file so you have to change that - but it works… well I hope it does for you. If it still doesn’t I’ll need to look into this, cuz something is not right. It is an MX file that uses a component, but I am 99.99% sure you have MX, but I thought it was worth mentioning in case it was over looked.

---

<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:** [May 13, 2003, 11:23pm UTC](https://forum.kirupa.com/t/php-flash-mx-mail-form-trouble/20238/17 "2003-05-13T23:23:25Z")

</div>

```php

<?
$to = "bohicaorf@yahoo.com";
$subject = "Request For Order";
$name = $_POST['name'];
$address = $_POST['address'];
$city = $_POST['city'];
$phone = $_POST['phone'];
$email = $_POST['email'];
$rentalDate = $_POST['rentalDate'];
$jumpType = $_POST['jumpType'];
$comments = $_POST['comments'];

$message .= "Order Request From $name <$email> 
";
$address .= "Address: $address";
$message .= "Jump Type: $jumpType 
";
$header = "From: $name <$email>";
$message .= "$comments 
";

mail($to, $subject, $message, $header);

?>

```

Ok, now that code did work for me. It sent an e-mail to my account, from the SWF file. Hopefully it will work for you.

---

<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:** [May 13, 2003, 11:55pm UTC](https://forum.kirupa.com/t/php-flash-mx-mail-form-trouble/20238/18 "2003-05-13T23:55:09Z")

</div>

Thanks Jubba, I used it and it did send an email, however the email did not show the information entered in the form, only the header info… nothing else like name, address, etc. Any ideas as to why?

Peace

---

<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:** [May 14, 2003, 12:06am UTC](https://forum.kirupa.com/t/php-flash-mx-mail-form-trouble/20238/19 "2003-05-14T00:06:22Z")

</div>

Yeah, your file is set up a little strange… the actual PHP code is at least… I would do something like this:

```php

<?
$to = "bohicaorf@yahoo.com";
$subject = "Request For Order";
$name = $_POST['name'];
$address = "Address: " . $_POST['address'];
$city = $_POST['city'];
$phone = $_POST['phone'];
$email = $_POST['email'];
$rentalDate = $_POST['rentalDate'];
$jumpType = $_POST['jumpType'];
$comments = $_POST['comments'];

$message = "Order Request From $name <$email> 
";
$message .= $address . "
" . $city . " 
 " . $rentalDate;
$message .= "
Jump Type: $jumpType
"; 
$message .= "$comments 
";
$header = "From: $name <$email>";

mail($to, $subject, $message, $header);

?>

```

try that… that might work…

---

<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:** [May 15, 2003, 8:14pm UTC](https://forum.kirupa.com/t/php-flash-mx-mail-form-trouble/20238/20 "2003-05-15T20:14:48Z")

</div>

thanks… I’ll give it a try today.

My PHP skills are obviously lacking - but hopefully that’ll change

[Next page](https://forum.kirupa.com/t/php-flash-mx-mail-form-trouble/20238.md?page=2)
