Search engine
Replies: 1   Views: 1011  Subscribers: 2

Posted by ferman · 05-01-2013 - 01:42

i have made a search engine and connected to my PHPMySQL database. i have manage to get data from the database fields on the local server. but what i have problem with is how to filter the the amount of information. here is the two code files i made for this purposes:

**********this is the index.php file***********
<form action= 'search.php' method='GET'>
<font face='sans-serif' size='5'>
Welcome to Ferman's Search Engine. <br>
<input type='text' size='50' name='search'> <input type='submit' name='submit' value='Search'>
*********This is the counter file for the index file called search.php *********** ­

//here we connect to database
mysql_connect("localhost","root","fbr110404") or die (mysql_error());
echo "Connected to MySQL<br /><hr />";

mysql_select_db("searchengine") or die (mysql_error());
echo "Connected to Database<br /><hr />";

$query = "SELECT * FROM hooks";
$result = mysql_query($query) or die (mysql_error());
while ($row = mysql_fetch_array($result)) {
echo $row['Hook_ID'] . " - " . $row['Hook_Info'];
echo "<br />";

Best Regards Ferman­