Help - Search - Members - Calendar
Full Version: Html Search Form
Zymic Webmaster Forums > Web Design & Development > Client Side Scripting > HTML and CSS
djk2k
How are these set up? I have one for my new site layout but as i've never used a html one Im a bit unsure,

Here is the search coding:

<div class="searchform">
<form action="index.html" method="get">
<fieldset>
<input name="field" class="field" value=" Enter search word ..." />
<input type="submit" name="button" class="button" value="Search" />
</fieldset>
</form>

and in the css under search form there seems to be nothing that would control it as its all img tags etc, would this form actually work?
Alex
No, because there's nothing to handle the query string you'll generate. You'll want to build a search page (say: search.php) in a server-side language like PHP. It can then search your site based on the logic you write.
djk2k
How and what is the easiest way to do a search page?

I've not used search forms before so its all new to me lol
DORA IZ HAWT
This might be the easiest:

http://www.google.com/coop/cse/
MrTouz
google search page is for google searchs...

i think what he wants is a search for his website content. I am guessing you will need to store your infos inside a database and than work with a search script that search inside this database what ever information you typed inside your html form.
Cmain
QUOTE(MrTouz @ Feb 27 2008, 07:40 AM) *
google search page is for google searchs...


Look at the link he provided.
QUOTE
Have a website or collection of sites you'd like to search over? With Custom Search Engine, you can harness the power of Google to create a search engine tailored to your needs.


It can be used to search just your site as long as it is indexed.
Paradoks
it is actually impossible to have a HTML pure search form, you must have a PHP config,(handler) or a SQL database.
MrTouz
ill try it and see what it gives, i never saw any sites using this system, and i personally use to use google search from my sites but never knew it was for "inside" site search. can be good, anything that google provides is actually pretty good.
DORA IZ HAWT
I think for mySQL it's like this:

$query="SELECT title, content, link FROM table_name WHERE title IS LIKE $wut_they_searched_for"

but i could be wrong.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2012 Invision Power Services, Inc.