# Search Engine using "if..else" statements

**URL:** <https://forum.kirupa.com/t/search-engine-using-if-else-statements/307259>\
**Category:** programming\
**Created:** [March 31, 2010, 12:18pm UTC](https://forum.kirupa.com/t/search-engine-using-if-else-statements/307259 "2010-03-31T12:18:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![theflashdude](https://avatars.discourse-cdn.com/v4/letter/t/e274bd/32.png) [@theflashdude](https://forum.kirupa.com/u/theflashdude)\
**Post date:** [March 31, 2010, 12:18pm UTC](https://forum.kirupa.com/t/search-engine-using-if-else-statements/307259/1 "2010-03-31T12:18:04Z")

</div>

I’m making a site with **more than one artist** on it.  
I want to make an extremely simple search.

When they for example enter “nas” in the search box.

the **php header** will automatically redirect it to a page called “nas.php”.

I know it can be done using if else. like for example.

\<?  
If ( $textbox == “nas” || “nasir” )  
{  
header(‘location: nas.php’);  
}  
else {  
echo “not found”  
}  
?\>

Please help me by writing the code. I’ve completely forgotten PHP.  
Thanks. Hope you guys can help!
