  <?php
    //connect to batabase
    define('IN_BANDTOPIA', "You're here!!!");
    ini_set("display_errors","1");
    error_reporting(E_ALL ^ E_NOTICE ^ E_WARNING);	
	
    //variables
//    $userID=$_REQUEST['userId'];
	$bandName=$_POST['bt_search'];
	
	//find band
    $query = "SELECT * FROM Artists WHERE Name LIKE \"%{$bandName}%\"";
    $result = mysql_query($query, $mydb) or die(mysql_error() . "<br>" . $query);
    //$row = mysql_fetch_array($result);

    //display in band results
	$template -> assign_block_vars('bandfinder', array());
	while($row = mysql_fetch_array($result)) {
		$template -> assign_block_vars('bandfinder.band', array(
			"ARTISTID" => $row['ArtistId'],
			"NAME" => $row['Name']));
	}
	
  ?>