PHP search form

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
jdizzle
Forum Newbie
Posts: 5
Joined: Fri Jun 18, 2004 12:06 am

PHP search form

Post by jdizzle »

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?
Grim...
DevNet Resident
Posts: 1445
Joined: Tue May 18, 2004 5:32 am
Location: London, UK

Post by Grim... »

Got any code to show us?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

I'd like to know a little more, like how $keyword[n] is layed out.. is it a string, array, resource tree, keg of beer?
Post Reply