This is my first time to create a search filter. I had “switch statement” in mind. Whatever keywords the user inputs, it should check in switch statement. That switch statement will check values if it is present in mysql database. If it exists then it will display information in a table. If not, then it will redirect to “NoResultsFound.html”. So far, this is what I have in mind. Am I correct? If not, what should I modify?
Share
Well, a word “keyword” has a special meaning and has nothing to do with ArtistName and SongName.
So, start from substring search in all fields.
Also note, there is no use in redirecting user anywhere. Just stay on the same page, display entered value in the search string (processed via
htmlspecialchars()) and let user edit it and make another search