make search feature

Eric said I should do if condition...
I could not figure it out either.