Forum Moderators: open
<form id="search" action="">
<input name="searchFor" type="text" size="10">
<a href="#">search</a>
</form>
and I also have a page where I want it to search in: /photo_galleries.html
Do I have to set something special up to get this to work?
"I want a four wheel drive into my car. Here I have a little button which says 4WD which would fit right here next to the knob for the air condition. Do I need something else to get this to work?"
Thats about the stage where you are right now. Unfortunately there is a little more to site search than a search box. There are tons of free scripts out there you can go with. Some database driven some not.
However if you lack the technical background I would recommend to implement a google search box which you can customize for site search:
[google.com...]
[search.yahoo.com...]
(1) Easiest solution is adding the Yahoo search box like the one recommended if your site is already indexed by Yahoo! But if it is not indexed then you are not able to search it.
(2) If your site is a dynamic site that is database driven site then you have to search your database. This involve some programming where you have to write some codes and SQL query statement to search your database.
(3) In your case, I assume that your site is a static site that is all your files are html files. There is something missing in your search form there:
<form id="search" action="">
<input name="searchFor" type="text" size="10">
<a href="#">search</a>
</form>
Your "action" is blank. So when you pressed the search button no action would be taken. You need to write some codes in order to make your search form works. Do you know any web programming language like Perl, php, Asp, Java?
I assume that you know. Let's say you wrote your search code in Perl language and call it search.pl. You will have to upload this code into cgi-bin folder in your Linux web server. Then you will have to put the URL of this search code into your search form that is something like this:
<form id="search" action="http://yourwebsite/cgi-bin/search.pl">
<input name="searchFor" type="text" size="10">
<a href="#">search</a>
</form>
so that whenever you press the submit button, your search.pl will be executed to search your site.
If you do not have the capability to write your own search code then I suggest you try "Perlfect Search" script. You have to know a little bit about how CGI works in order to use the script.
Good luck with your site!
You have to know a little bit about how CGI works in order to use the script.
A very little bit, actually. If you can follow basic instructions, know how to use FTP, and can edit a few files, you'll have it working in no time. Note that you'll also want to have SSH access to your site to run the indexer, or else run it by cron every so often. (You can run the indexer through the browser, but that's much less secure...)