# If and Else statement help

**URL:** https://forum.kirupa.com/t/if-and-else-statement-help/310165
**Category:** flash
**Created:** [June 3, 2010, 4:51am UTC](https://forum.kirupa.com/t/if-and-else-statement-help/310165 "2010-06-03T04:51:48Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Mirtheus](https://avatars.discourse-cdn.com/v4/letter/m/41988e/32.png) [@Mirtheus](https://forum.kirupa.com/u/Mirtheus)
#### Post date: [June 3, 2010, 4:51am UTC](https://forum.kirupa.com/t/if-and-else-statement-help/310165/1 "2010-06-03T04:51:48Z")

</div>

I just need some simple validation for a text input field. The code that I am trying to get to work is:

on (release) {

if(name == “foo”){

```
form.loadVariables("email.php", "POST");

getURL("http://www.cnn.com", "_self");

```

} else {

```
getURL("http://www.msn.com", "_self");

}

```

}

The code is on the submit button, however no matter what I input it never hits the else statement. What am I missing? Thanks for any help.
