Jump to content

[SOLVED] No Data


jj20051

Recommended Posts

Ok. I Started Making A Very Small Search Script For My Website. I Made the Following Code Below. Later I Decided I Wanted To Add A Feature Where If There Were No Results It Would Say "No Content Matches Your Search." For Some Reason No Matter What I Try It Does Not Work. I Am Listing The Original Code So No One Get's Confused.

 

<?
include "config.php";
if (@$_POST['search']=="search")
{
$keyword=$_POST['keyword'];
$result=mysql_query("SELECT * FROM websites WHERE `title` LIKE '%$keyword%' OR `url` LIKE '%$keyword%' OR `description` LIKE '%$keyword%' ");
while ($results = mysql_fetch_array($result))
{
$title=$results['title'];
$url=$results['url'];
$description=$results['description'];
echo "<a href='$url'>$title</a><br><i>$description</i><br><font color=\"#339900\">$url</font><br><br>";
}
}

 

 

Link to comment
https://forums.phpfreaks.com/topic/119412-solved-no-data/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.