Hi there. This prints 'Edit Album' even when i enter something that's not in the database (or anything that's not LIKE something in the database):
unset($result);
$result = mysql_query("SELECT artist, title, ID FROM albums WHERE artist LIKE '$artist%' AND title LIKE '$title%'") or
die("Could not search for album");
// Check that there were results
if(!$result)
{
die("<h3>No results in search.</h3> " . mysql_error());
}
else //there is a match
{
echo '<h3>Edit Album:</h3>';
}
Does anyone know why? Thanks.