# Need help with the Script

**URL:** <https://forum.kirupa.com/t/need-help-with-the-script/213833>\
**Category:** Uncategorized\
**Created:** [January 23, 2007, 5:11pm UTC](https://forum.kirupa.com/t/need-help-with-the-script/213833 "2007-01-23T17:11:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![designursite](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/designursite/32/2209_2.png) [@designursite](https://forum.kirupa.com/u/designursite)\
**Post date:** [January 23, 2007, 5:11pm UTC](https://forum.kirupa.com/t/need-help-with-the-script/213833/1 "2007-01-23T17:11:14Z")

</div>

Hi everyone,

I have a problem with this script, i want it to goto the failed lable in the layer i have mentioned if the fields are not filled and if it is filled it should goto the sucess lable in the frame. Here is the script i have in the Send button:

```auto

 
on (release) {
 if (name eq "" or subject eq "" or message eq "" or email eq "") {
  gotoAndStop("failed");
 } else {
  loadVariablesNum("form.php", 0, "POST");
  gotoAndStop("sent");
 }
}
 
 

```

I tried it many times and it never worked, it always goes to the 2nd frame no matter what i have done in the form weather i filled it or not.

Kindly help me with this. You can check the fla which is attached.

Thanks,  
Regards.
