# Flash MX/LoadVars/PHP problem

**URL:** <https://forum.kirupa.com/t/flash-mx-loadvars-php-problem/9698>\
**Category:** flash\
**Created:** [December 16, 2002, 8:53pm UTC](https://forum.kirupa.com/t/flash-mx-loadvars-php-problem/9698 "2002-12-16T20:53:17Z")\
**Posts on this page:** 11\
**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:** [December 16, 2002, 8:53pm UTC](https://forum.kirupa.com/t/flash-mx-loadvars-php-problem/9698/1 "2002-12-16T20:53:17Z")

</div>

ok… simple stuff here… just basic Flash mailer stuff… I am pretty much possitive all my code is correct, and I think the problem is that I have upgraded to MX and I am sending the vars using an old method… here is my submit button code:

```php
on (release) {
	if (senderName == "" or senderComments == "") {
		gotoAndStop(2);
	} else {
		lineAdapt();
		loadVariablesNum("comments.php", 0, "POST");
		gotoAndStop(3);
	}
}

```

Line adapt calls a function that changes flash’s carrier symbol ( \r ) to one used in PHP (  
) …

I believe the problem is \*\*loadVariablesNum(“comments.php”, 0, “POST”); \*\* … this worked in Flash 5, but do I have to change “loadVarsNum” for MX???

Help would be appreciated!

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:** [December 16, 2002, 9:00pm UTC](https://forum.kirupa.com/t/flash-mx-loadvars-php-problem/9698/2 "2002-12-16T21:00:37Z")

</div>

Maybe just loadVariables() will work, am I right in this thinking?? I am going to go try that now…

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:** [December 16, 2002, 9:23pm UTC](https://forum.kirupa.com/t/flash-mx-loadvars-php-problem/9698/3 "2002-12-16T21:23:00Z")

</div>

ok… that didnt seem to work… I think I am going to freak out.

---

<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:** [December 16, 2002, 11:18pm UTC](https://forum.kirupa.com/t/flash-mx-loadvars-php-problem/9698/4 "2002-12-16T23:18:26Z")

</div>

Anyone have any ideas??

If this helps here is the lineAdapt() function:

```php
stop();
function lineAdapt() {
	message_send = message;
	while (msg_count<message.length) {
		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, (message_send.length)-msg_count+2));
		}
	}
	message = message_send;
	delete msg_count;
	delete message_send;
}

```

Here’s the PHP script:

```php
<?php
mail(rwalsh@grafikdesigns.com, "Comments/Questions from
 $senderName", "Information Submitted By User:

Name: 
$senderName
 Date: $senderDate
 Phone Number: 
$senderPhone
 Email: $senderEmail
 Questions/Comments: 
$senderComments", "From: $senderEmail
Reply-To: 
$senderEmail
X-Mailer: PHP/" . phpversion());
?>

```

…anyone…? 😛

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:** [December 17, 2002, 5:34am UTC](https://forum.kirupa.com/t/flash-mx-loadvars-php-problem/9698/5 "2002-12-17T05:34:16Z")

</div>

.: bump :.

---

<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:** [December 17, 2002, 6:00am UTC](https://forum.kirupa.com/t/flash-mx-loadvars-php-problem/9698/6 "2002-12-17T06:00:02Z")

</div>

As I already said… ServerSide Flash is out of my league at this moment. But I sure hope someone else is able to help.

H88 will probably buzz by and answer it in a jiffy…lol.

---

<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:** [December 17, 2002, 6:40am UTC](https://forum.kirupa.com/t/flash-mx-loadvars-php-problem/9698/7 "2002-12-17T06:40:24Z")

</div>

yeah I PMed him with a link to this thread… so hopefully he’ll swoop in and save the day!!! :rambo:

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:** [December 17, 2002, 10:18am UTC](https://forum.kirupa.com/t/flash-mx-loadvars-php-problem/9698/8 "2002-12-17T10:18:12Z")

</div>

assuming the problem is there … try this:

```php

on (release) {
	if (!senderName.length or !senderComments.length) {
		gotoAndStop(2)
	} else {
		lineAdapt()
		loadVariablesNum("comments.php", "0", "Post")
		gotoAndStop(3)
	}
}

```

you might need to use \_root.senderName and \_root.senderComments

hope it 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:** [December 17, 2002, 4:30pm UTC](https://forum.kirupa.com/t/flash-mx-loadvars-php-problem/9698/9 "2002-12-17T16:30:13Z")

</div>

thanks kax, but thats not it… that part of the script checking to see that the user has input the fields works just fine! Thanks again.

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:** [December 18, 2002, 12:56am UTC](https://forum.kirupa.com/t/flash-mx-loadvars-php-problem/9698/10 "2002-12-18T00:56:44Z")

</div>

[SIZE=1]::please help - im desperate::[/SIZE] :\*(

---

<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:** [December 19, 2002, 7:27am UTC](https://forum.kirupa.com/t/flash-mx-loadvars-php-problem/9698/11 "2002-12-19T07:27:43Z")

</div>

The email address is a string, mail("rwalsh@grafikdesigns.com", … also you might want to store the Message to a variable and then include the variable to the Message Parameter instead of write out a string everytime. Did’nt try it, am not using my computer right now. [SIZE=1]I don’t have PHP installed on this pc.[/SIZE]
