+ 5

How to make search bar?

I wanna know about how to make a search bar for websites which not link to google it searches for what is it in my website . Suppose i have a search bar , a user comes to my webpage and search computer than the results will come of search from my website only . Please help me ...... Your contribution is required ........

4th Sep 2017, 9:19 AM
Vansh
Vansh - avatar
6 odpowiedzi
+ 6
You have two main ways to achieve a search function ('search bar' would more refer to the layout holding the functionnality ;)): > handling on server/back-side, making search inside your own database > handling on front-side, using google search with 'site:' option with the keyword to search, wich will limit the google search to the specified domain immediatily after the option name (no space between double dot colon and domain name)... Make a try by doing search in google with: "vansh sharma site:sololearn.com" ... or anything you want ^^
4th Sep 2017, 10:33 AM
visph
visph - avatar
+ 4
@Kartikey please understand than speak .. like in the sololearn/code playground there is a search bar , when we type any code name than it opens the name of the code and the code okkkk. Whatever we write suppose if we write "Bank of sololearn" than it opens the code "Bank of sololearn" which is made by Shami Khan....
4th Sep 2017, 9:44 AM
Vansh
Vansh - avatar
+ 3
@Kartikey Sahu This is opening my Index Of C but i want that if i search welcome and welcome is written in my website than it goes to welcome where it is written..
4th Sep 2017, 9:37 AM
Vansh
Vansh - avatar
+ 2
<form method="get" action="/"> <input type="text" name="q"> <input type="submit" value="search"> </form>
4th Sep 2017, 9:29 AM
Kartikey Sahu
Kartikey Sahu - avatar
+ 2
Search doesn't works on local computer, install Wampserver and host you HTML file in www folder of wamp install directory. Then try it Read this article https://www.thoughtco.com/searching-your-site-3466200
4th Sep 2017, 9:40 AM
Kartikey Sahu
Kartikey Sahu - avatar
4th Sep 2017, 9:45 AM
Kartikey Sahu
Kartikey Sahu - avatar