# Using and...or

**URL:** <https://forum.kirupa.com/t/using-and-or/278479>\
**Category:** Uncategorized\
**Created:** [December 30, 2008, 9:59pm UTC](https://forum.kirupa.com/t/using-and-or/278479 "2008-12-30T21:59:45Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![gencoglu](https://avatars.discourse-cdn.com/v4/letter/g/898d66/32.png) [@gencoglu](https://forum.kirupa.com/u/gencoglu)\
**Post date:** [December 30, 2008, 9:59pm UTC](https://forum.kirupa.com/t/using-and-or/278479/1 "2008-12-30T21:59:45Z")

</div>

Hi,  
What am I doing wrong ? I have 5 textfields to create random words and I have another five input textboxes to enter answer and if the answers are correct the third dynamic textbox will alert “…”

any idea ? thanks

```php
on(press) 
{ 
    for(var z=0;z<=4;z++){ 
    if(_root["p"+z].text=="we"or _root["p"+z].text=="they" or _root["p"+z].text=="you" and _root["in"+z].text=="are" ) 
    { 
        _root.comment0.text="good job"; 
        }else 
        { 
            _root.comment0.text="sorry"; 
         
        } 
     if(_root["p"+z].text=="he"or _root["p"+z].text=="she" or _root["p"+z].text=="it" and _root["in"+z].text=="is" ) 
    { 
        _root.comment1.text="good job"; 
        }else 
        { 
            _root.comment1.text="sorry"; 
         
    } 
    }

```
