I'm trying to make a PHP search form for a webcomics. This is what I have so far.
I have a textfield and a search button that collects the keywords that the person wants. In another PHP file, I have an array that contains keywords that correspond to the comics in an error.
For example, $keyword[0] would contain keywords that would go with the very first comic, $keyword[36] would contain keywords that would go with the 37th comic.
What I want it to do is to take the keywords from the textfield and to search the keywords in the array. If there is a match, I want it to list the search result.
Here are some problems I ran into one.
1) If a person puts in a keyword that applies to more than one comic then it would list that comic twice.
2) I need to create another array but I'm having trouble instantiating it. For instance, if I have an array that I want to have 37 different values, how do I instantiate it so that it has 37 directories?
PHP search form
Moderator: General Moderators