Hi
This is the code of a search engine in my site and it works pretty well, the problem is that in case there were no records registered the "Not found " message never appears.
Thanx for your help!
<?php
if (!isset($search)){
echo "Must specify a search criteria";
echo "</html></body> \n";
exit;
}
$result = mysql_query("SELECT * FROM mydb WHERE name LIKE '%$search%' ORDER BY name");
while ($Resultsearch = mysql_fetch_array($result)){
$name = $Resultsearch["name"];
if ($result == 0){
echo "¡ Not found " . $name ." registered";
exit;
}
?>
Any help will be fully appreciated