# Need some seriouse help with AS and PHP combination

**URL:** <https://forum.kirupa.com/t/need-some-seriouse-help-with-as-and-php-combination/64482>\
**Category:** Uncategorized\
**Created:** [September 16, 2004, 5:36pm UTC](https://forum.kirupa.com/t/need-some-seriouse-help-with-as-and-php-combination/64482 "2004-09-16T17:36:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Azazel](https://avatars.discourse-cdn.com/v4/letter/a/838e76/32.png) [@Azazel](https://forum.kirupa.com/u/Azazel)\
**Post date:** [September 16, 2004, 5:36pm UTC](https://forum.kirupa.com/t/need-some-seriouse-help-with-as-and-php-combination/64482/1 "2004-09-16T17:36:34Z")

</div>

OK, here’s the deal. I’ve got a mail form, check! Now, i need to make it so that you HAVE TO fill in to of the fields… this is what i got so far on the AS front:

frame 1:

stop();  
//let’s stop the timeline

System.useCodepage=true;  
//and make shure that we can use all sorts of internationall letters

scroll.\_visible = (input3.maxscroll \> 1);  
input3.onChanged = function() {  
scroll.\_visible = (this.maxscroll \> 1);  
}//just to be “kewl”, lets hide the scrollbar if it isn’t needed.

name = “”;  
email = “”;  
input = “”;  
//then we clear all the txt fields

input1.tabIndex = 1;  
input2.tabIndex = 2;  
input3.tabIndex = 3;  
//lets make shure that we keep the order on that tab btn

error = “forget something?”;  
//and then we make an error statement

function formcheck() { //here comes the interesting part  
if ((name == null) || (name == “”)) {  
name = error;  
action = “”;  
}//in other words, if the name box is empty… show the error message that we created!

```
if ((input == null) || (input == "")) {
	input = error;
	action = "";
}//same thing here, but with the message field

if ((name != "") && (name != error) && (input != "") && (input != error)) {
	name = input1.text;
	email = input2.text;
	webb = input3.text;
	this.gotoAndPlay(10);
}

```

}//now, if everyting is ok, go to that next scene where it says sending… hopefully, thats what we will be doing two.

**[COLOR=Red]ALL OF THE ABOVE IS INSIDE A INSTANCE NAMED “form”[/COLOR]**

frame 10: (\_parent to above script, “contactform\_mc”)

\_root.enter.level1.motion.contact\_mc.cont\_level2\_mc.contactform\_mc.form.loadVariables(“mail.php”, “POST”);

frame 80: (same mc as above)

this.gotoAndStop(1);

mail.php

\<?php

$send = “info@frameset.se”;  
$subject = “Mail från hemsidan”;

$headers = "Från: " . $\_POST[“name”];

$headers .= “\<” . $\_POST[“email”] ."\>  
";

$headers .= "svara: " . $\_POST[“email”];

$input = $\_POST[“input”];

$input = strip\_tags("$input");  
$headers = strip\_tags("$headers");

mail($send, $subject, $input, $headers);  
?\>

OK, problem is, it’s not going thrue!?! What have i missed/done wrong here? :q:  
Also, i need some help to make it so that when it getts to the loadVariables part, it doesn’t continue untill it’s realy done with sending the variables.

:ch: after a couple of weeks… I GIVE UP! Is there anybody out there who can save me from the sleeples night :bored:

[COLOR=Red] **ALL IN FMX** [/COLOR]

---

<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 17, 2004, 3:15pm UTC](https://forum.kirupa.com/t/need-some-seriouse-help-with-as-and-php-combination/64482/2 "2004-09-17T15:15:56Z")

</div>

well…

see if this can help you in some way

[http://www.bigjolt.com/](http://www.bigjolt.com/)

the lab \> php\_mailer
