Click here to Skip to main content
15,870,130 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
PHP
<?php
$con=mysqli_connect("localhost","root","","search");
if(mysqli_connect_errno())
{
echo"Error can not connect DB".mysqli_connect_error();
}
$sql=mysqli_query("SELECT * FROM searchengine WHERE pername LIKE '%$_GET[name]%'");
while($rr=mysqli_fetch_array($sql))
{
echo $rr[name];
}
?>
Posted
Comments
kbrandwijk 30-Aug-14 10:12am    
What is the problem?
pandu web dev 31-Aug-14 8:51am    
your Question is incomplete. What do you mean by a search engine?

1 solution

Are you thinking of a web-wide search engine or just a site-wide search engine? If you wanted a site-wide search engine and the content/text of your pages are stored in a database then it is pretty easy to do. Doing an internet-wide search engine such as google, yahoo, etc...are faaaaar more difficult and obviously are pretty prevalent across the Net already. Although google can help you with a site-wide search engine without having to code your own.
I do not know exactly what you'd be planning to store in the database table that is in your posting but it would be a start in making a search engine to search your own site's content if it's content is store in a database.

Maybe I'm wrong here in either understanding what you are looking for or in my own assumptions. Perhaps with some clarification/elaboration I, or someone else here, might be able to provide more assistance.
 
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