# Form problem

**URL:** https://forum.kirupa.com/t/form-problem/242355
**Category:** Uncategorized
**Created:** [October 25, 2007, 2:23am UTC](https://forum.kirupa.com/t/form-problem/242355 "2007-10-25T02:23:23Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![carbone6](https://avatars.discourse-cdn.com/v4/letter/c/41988e/32.png) [@carbone6](https://forum.kirupa.com/u/carbone6)
#### Post date: [October 25, 2007, 2:23am UTC](https://forum.kirupa.com/t/form-problem/242355/1 "2007-10-25T02:23:23Z")

</div>

My form calls on a PHP script… it works fine when it’s on the root timeline but when i put it inside another clip it hangs on the confirmation stage.  
You can download it here:  
[http://www.flashkit.com/movies/Interfaces/Forms/Flash\_Mx-David\_Kh-9916/index.php](http://www.flashkit.com/movies/Interfaces/Forms/Flash_Mx-David_Kh-9916/index.php)

I think the problem is this part of the script:

loadVariablesNum(mailform, 0);  
answer = confirm;

Here is the rest of the script:

fscommand (“allowscale”, “false”);  
fname1.tabIndex = 1;  
telno1.tabIndex = 2;  
pcode1.tabIndex = 3;  
email1.tabIndex = 4;  
hear1.tabIndex- 5;  
comments1.tabIndex = 6;  
mailform = “mailform.php”;  
confirm = “please wait for confirmation …”  
action = “send”;  
Selection.setFocus(“fname”);  
function validate (address) {  
if (address.length\>=7) {  
if (address.indexOf("@")\>0) {  
if ((address.indexOf("@")+2)\<address.lastIndexOf(".")) {  
if (address.lastIndexOf(".")\<(address.length-2)) {  
return (true);  
}  
}  
}  
}  
return (false);  
}  
function formcheck () {  
if ((((email == null)) || (email.length\<1)) || (email == “ERROR! Address not valid”)) {  
email = “ERROR! Address not valid”;  
action = “”;  
}  
if (!validate(email)) {  
email = “Address not valid”;  
action = “”;  
}  
if ((((fname == null)) || (fname.length\<1)) || (fname == “ERROR! Address not valid”)) {  
fname = “Name required”;  
action = “”;  
}  
if ((((pcode == null)) || (pcode.length\<1)) || (pcode == “ERROR! Postcode not valid”)) {  
pcode = “Postcode”;  
action = “”;  
}  
if ((validate(email)) && (email != “ERROR!”) && (fname != “”) && (lname != “”)) {  
action = “send”;  
loadVariablesNum (mailform, 0, “POST”);  
gotoAndPlay (“wait”);  
}

```
if ((((hear == null)) || (hear.length&lt;1)) || (hear == "ERROR! Entry not valid")) {
	hear = "Input here";
	action = "";
}
if ((((telno == null)) || (telno.length&lt;1)) || (telno == "ERROR! Phone number not valid")) {
	telno = "Phone Number required";
	action = "";
}

}

```

stop ();
