Name: Andy Date: October 28, 2003 at 07:42:05 Pacific Subject: how to search on a site? OS: xp CPU/Ram: 1600 512
Comment:
Please can you tell me how to get a search function on my site, I've tried the one in front page and a downloaded script I put in the page, none work when on the site. I've tried to find a walk through guid to lern but just got confused between server scripts and html (when to change the .html or not) The site is frames with contents on left main on rigt and banner over, I have a search link in the contents which brings up the search page in the main window, but when I enter something and hit search nothing happens. Thanks for any help.
Do you have access to PHP, ASP, Python, or Perl on your website?
The simplest, most crude search feature is to have a script which uses a little pattern matching (they all have functions and libraries for this) in the folders (or filelist) you specify for a given string. The better way is to put your content in a database, where searching can be optimized in multiple ways. The best ones actually create index files, either in a database or in the filesystem, which are optimized after a few passes.
You can find lots of searching scripts here. hotscripts.com
thanks for that, I'll have a look at those sites. What I am doing is creating a tribute site with a list of entries with photos etc in a scrolling table, will the results be able to jump them to any cell in a continuose list? rather than to a page
forgot to say, my hosting does support scripts, but I think the problem is I dont know how to use them, I read somewhere you have to change extentions or put them in differant files on the server or something like that? sorry I'm a bit slow at this,
The most common way to do what you have described is place data into a database. Databases contain tables (literally, they look like tables when you arrange them).
What you can do (which is faster than searching) is have user's select a link (say, WinnerA) which sends a query to the database. Your query goes into the database and pulls up specific tables and information in those tables, and then reassembles them in HTML. The overhead is a little daunting in the beginning, but this approach scales very well and is fast. You can also have the query simply search the database, which is still faster than searching a bunch of HTML pages. This is so common that it is all over the Internet with tutorials and scripts. Many books also cover the topic. You might hear it termed a database-driven website, because most of the information comes out of the database.
Good news though, because you can also use straight, easy HTML for what you described.
thanks for that, I will have to write an in depth walk through when I know what i'm doing. Untill I'll rely on your brains.there seems to be a lot of options open to me, maybe I'll do an index page of all the inclusions, which will link to the piont on the list as you describe, if it gets to big I'll have to seach the index page tho and be back where I started, some people will want to seach by name, some by date, and some by subject, I've got a lot to learn still