I really want to learn how to make my own search engine for my site. I have the defined buttons and labels, but it doesn't search. I can't figure out the HTML or XHTML code for actually searching the site.
This is the code I have so far:
<p class="search">
<label>SEARCH</label>
<input name="search" type="text" class="txt" />
<input name="search-btn" type="submit" class="btn" value="SEARCH" />
</p>
Thanks!
You cannot provide a search function with just HTML and XHTML, unless you're just using a standardized form to get some external search engine (like Google) to do the work.
It is possible to do search with JavaScript, but that requires you to transfer all the data to the client, so it is not a very good idea.
If you want to write it yourself, you should use some server-side language, such as PHP or Python - it depends on what you have access to.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With