Click here to Skip to main content
15,891,763 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have created a small dummy website using php and mysql. Basically, in the homepage all the data from my mysql database is fetched and shown to the user along with a add to cart option. Now, i want to create a search tab on the top of my page such that the user can type the keywords and the details are searched from my website and shown to the user. How can i do that? Any links or suggestion is very appreciated. Is there any third party engine that i can use for my website? I am not planning to host it in the server. Its just a school project which i have been given to do.
Posted
Comments
Deepu S Nair 18-Jan-15 7:53am    
make use of google...

1 solution

Yes, there is a third-party plugin, designed by Google to assist you in this feature, you can use this plugin... but the only problem you might get across is the UI of your website. Anyways, try it at: https://www.google.com/cse/[^], you should also look in the footer links, all of the resources for this plugin are already given.

Secondly, I have never done any work in PHP and MySQL but yes, I can give you a suggestion for the search engine of your website. You see, the search queries can be generated by appending the WHERE clause, with a LIKE command and passing the "keyword" of your search to it, MySQL would return all of the rows that have a match.

MySQL string comparison functions[^]

Finally, I would like to provide a few resources that you might find helpfull,

http://www.webreference.com/programming/php/search/index.html[^]

http://mrbool.com/how-to-create-your-own-search-engine-with-php-and-mysql/25836[^]

https://www.udemy.com/creating-a-search-engine-in-php/[^]

Article on CodeProject: Making a Search Engine[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900