# Flash mx php mailform

**URL:** <https://forum.kirupa.com/t/flash-mx-php-mailform/14618>\
**Category:** Uncategorized\
**Created:** [February 28, 2003, 2:38pm UTC](https://forum.kirupa.com/t/flash-mx-php-mailform/14618 "2003-02-28T14:38:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nickos](https://avatars.discourse-cdn.com/v4/letter/n/b3f665/32.png) [@Nickos](https://forum.kirupa.com/u/Nickos)\
**Post date:** [February 28, 2003, 2:38pm UTC](https://forum.kirupa.com/t/flash-mx-php-mailform/14618/1 "2003-02-28T14:38:00Z")

</div>

Hi there

I’m need a bit of help with a php form, I’m already trying to solve it myself for quite a few days now but know results.  
Hope some one can help me with this.

here’s the script:

\<?php  
mail(“my@email.here”, $naam, $adres, $postcode, $plaats, “From: PHPMailer  
Reply-To: $from  
X-Mailer: PHP/” . phpversion());  
?\>

in the flash mx movie i got 5 variables with the names; naam, adres, postcode, plaats, from

on my first keyframe i’ve got some actions:

stop();  
function lineAdapt() {  
message\_send = message;  
while (msg\_count\<length(message)) {  
msg\_count = msg\_count+1;  
if ((substring(message\_send, msg\_count, 2)) eq “\r”) {  
message\_send = (substring(message\_send, 1, msg\_count-2)) add "  
" add (substring(message\_send, msg\_count+2, (length(message\_send))-msg\_count+2));  
}  
}  
message = message\_send;  
delete msg\_count;  
delete message\_send;  
}

And on the send button the actions are:

on (release) {  
if (naam eq “” or adres eq “” or postcode eq “” or plaats eq"" or from eq"") {  
stop();  
} else {  
lineAdapt();  
loadVariablesNum(“mailing.php3”, 0, “POST”);  
gotoAndStop(2);  
}  
}

---

<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:** [February 28, 2003, 3:10pm UTC](https://forum.kirupa.com/t/flash-mx-php-mailform/14618/2 "2003-02-28T15:10:15Z")

</div>

Howdy…

Just correcting syntax errors for the code…

```php
function lineAdapt()
{
	message_send = message;
	while (msg_count == msg_count + 1)
	{
		if ((substring(message_send, msg_count, 2)) == "\r")
		{
			message_send = (substring(message_send, 1, msg_count - 2)) + "
" + (substring(message_send, msg_count + 2, (length(message_send)) - msg_count + 2));
		}
	}
	message = message_send;
	delete msg_count;
	delete message_send;
}

```

```php
on (release)
{
	if ((naam == "") || (adres == "") || (postcode == "") || (plaats == "") || (from == ""))
	{
		stop();
	}
	else
	{
		lineAdapt();
		loadVariablesNum("mailing.php3", 0, "POST");
		gotoAndStop(2);
	}
}

```

Please use [code formatting](http://www.kirupaforum.com/misc.php?action=bbcode#buttons) next time you post your code…
