Just an quick example how to search and add information to MySQL.
<?php
// search.sql : https://pastee.org/e7zke
// when searching, use % as wildcard.
$con = mysql_connect("localhost","user","pw");
mysql_select_db("search", $con);
if (!$con) { die('Could not connect: ' . mysql_error()); }
if( !isset($_GET['addnew']) ) { echo "ADD NEW: <form action=# method=get><b>URL</b>: <input type=hidden name=addnew><input type=text name=u> - <b>Title</b>: <input type=text name=t> - <b>Keywords</b>: <input type=text name=kw> <input type=submit value=Add!></form><br/><br/>SEARCH: <form action=# method=get><b>Search</b>: <input type=text name=s> <input type=submit value=Search!></form>"; }
if( isset($_GET['addnew']) ) {
$url = $_GET['u'];
$title = $_GET['t'];
$keywords = $_GET['kw'];
$result = mysql_query("INSERT INTO search(title, url, word) VALUES('$title', '$url', '$keywords')");
mysql_close($con);
die("Added.");
}
$getme = "%";
$getme = $_GET['s'];
$result = mysql_query("SELECT SQL_CACHE * FROM search where word like '%$getme%' limit 0,25");
echo "<table border='0' padding='10'><tr><th>ID</th><th>Title</th><th width='100'>URL</th></tr>";
while($row = mysql_fetch_array($result)) {
echo "<tr>";
echo "<td>" . $row['id'] . "</td>";
echo "<td>" . $row['title'] . "</td>";
echo "<td>" . $row['url'] . "</td>";
echo "</tr>";
}
echo "</table>";
mysql_close($con);
?>