tags:

views:

30

answers:

2

I'm new to html and am trying to implement a search function. I've created an input box and search buttons but I have no idea what the form page should look like. Please Help. Thank you! Here's the code:

"<form name=MB method=\"POST\" action=\"formpage-->not sure what this page should look like">\n "
"<p align=MIDDLE>Search for Tokens: " + //Search Description 
"<input name=\"term\" type=\"text\" onkeypress=\"if(event.keyCode==13) " +
"document.MB.exact.click();\" size=30> </p> \n" + //Search Box
"\n<FONT FACE=\"Geneva,Arial,Helvetica,lucida sans,san-serif\"><STRONG>" + //search buttons
"<input name=\"exact\" type=\"submit\" value=\"Find Exact\"" +
"\n<input name=\"AND\" type=\"submit\" value=\"Find All Tokens\">" +
"\n<input name=\"OR\" type=\"submit\" value=\"Find Any Tokens\">" +
"\n</STRONG></FONT></TD>\n</TR>\n</TABLE>\n</form>\n"

PS the reaszon it's all in quotes is because its a java program that generates the htmlenter code here

A: 

This is a pretty vague question but you probably want something like:

<form action="URL_FOR_SEARCH_HERE" method="GET">
<input type="text" name="query"/><br />
<input type="submit" value="Search"/>
</form>

(URL_FOR_SEARCH_HERE would be replaced by something like "/search.php", depending on what server-side technology you're using to do the actual search processing.)

JacobM
so i guess what i really want to know is how do i utilize the server-side technology to do search processing?
That's a much bigger question; what kind of server-side technology do you have available? You may want to close this question and start a new one ("how do I create a search box for my site using PHP?" or whatever the appropriate technology is).
JacobM
A: 

It depends what you are searching for as well. If you are searching through a database then your form should point to some code that executes a sql search function.

Martin