I found a different code which goes like this:
<?
$connection = mysql_connect('localhost', 'username', 'password');
mysql_select_db('wu_wrestleinfo_com', $connection);
$result = mysql_query ("SELECT * FROM music WHERE song LIKE '%$search%'");
while($r=mysql_fetch_array($result))
{
//grab the result
$song=$r["song"];
//print it out
echo $song;
echo "<br>";
}
if(mysql_num_rows($result)==0)
{
echo 'No matches found!';
}
else
{
#matches found
}
?>
What I'd like is to add another code, which will allow people to click on the results, making the results a link to the specific id page.
So for example, if someone types in dogs, it finds if dogs is in the database, then displays the results with the link of the dogs page.