search page if ($numrows == 0 or $numrows > 1) { header("Location: /search/$b"); } else { //$row = @mysql_fetch_array ($queryresult); //$name = $row[name]; include("/home/httpd/vhosts/nearo.com/httpdocs/include/content/artists/overview.php"); } } } else { include("/home/httpd/vhosts/nearo.com/httpdocs/include/content/artists/overview.php"); } break; case 'venue': $sql = "SELECT `name` FROM `venue` WHERE `name` LIKE '%".trim($b)."%'"; $queryresult = @mysql_query($sql); $numrows=mysql_num_rows($queryresult); if ($numrows == 0 or $numrows > 1) { header("Location: /search/$b"); } else { while ($row = @mysql_fetch_array ($queryresult)) { echo $name = $row[name]; } } break; case 'search': $sql = "SELECT `name` FROM `artists` WHERE `name` LIKE '%".trim($b)."%'"; $queryresult = @mysql_query($sql); $numrows=@mysql_num_rows($queryresult); if ($numrows >= 1) { while ($row = @mysql_fetch_array ($queryresult)) { $name = $row[name]; } include("/home/httpd/vhosts/nearo.com/httpdocs/include/content/search/overview.php"); } else { $sql = "SELECT `name` FROM `venue` WHERE `name` LIKE '%".trim($b)."%'"; $queryresult = @mysql_query($sql); $numrows=@mysql_num_rows($queryresult); if ($numrows >= 1) { while ($row = @mysql_fetch_array ($queryresult)) { echo $name = $row[name]; } include("/home/httpd/vhosts/nearo.com/httpdocs/include/content/search/overview.php"); } else { echo "no results for $b"; } } break; } //if(preg_match("/google/i",$_SERVER['HTTP_USER_AGENT'])) // $google=true; ?>