help making simple search function

Man of Honour
Joined
12 Jan 2003
Posts
20,633
Location
UK
was wondering if anyone might be able to offer some advice. I'm looing for a very simple way of adding a database search to my site. just a simple text box so that when you enter a word in it, it seaches some form of database and returns any matching results. sounds fairly simple, but i cant get it to work (i am not very experienced with web design at all!)

main thing is that i need it to search a really easy to maintain database, maybe even something like an excel sheet, or even a text doc if thats possible?! need to be able to update the entries in it a lot thats all.

is there any chance somone can put together a VERY simple example for this? perhaps a simple html coded search page and an example results page? just something with a "search" page and a database which it can search?! once i see how things like this work i find it easy enough to pick it up and edit it etc, just need a kick start! doesnt matter how simple it is!

any help is most appreciated :)

thanks
 
Craig, that's fantastic, i'll give it a go and see how i get on :)

edit: the first bit of code there, is that where i also need to include the results? or do i do another file containing all the results?

for example, if i wanted to have a database listing loads of fruit (i don't, it's just an example! :p) where would i put all the entries, and what would they need to look like?
 
thanks Trigger. I havent really dealt with SQL databases either, and i'm grateful if people can "hold my hand" through it :) Can this search function above be used to link into any other type of database? like even a text doc in a certain format? Any chance someone could send me (email in sig) and example SQL really simple database and point me in the right direction.

i wish i knew more about all this stuff! :)
 
that sounds fantastic, i would be very grateful for any help you can give. Like i say, i just need a starting block really, reading through the code it makes sense to me, i just wouldnt know where to begin. if you could put an example together that would be brilliant
 
Trigger said:
I've sent the files to your ocukmods.co.uk e-mail address in ZIP format. Hope they're of some use to you :)

Ben

Ben, thank you for all your help. I'll have a look through them now :)
 
Back
Top Bottom