Connection String

define('HOSTNAME', 'localhost');
define('USERNAME', 'khabarez_naveed');
define('PASSWORD', 'naveed');
define('DATABASE', 'khabarez_naveed');
$dbLink = mysql_connect(HOSTNAME, USERNAME, PASSWORD);
mysql_query("SET character_set_results=utf8", $dbLink);
mysql_select_db(DATABASE, $dbLink);
mysql_query("set names 'utf8'",$dbLink);

Select Query

$query ="SELECT * FROM test";
or die ("Connection to database table failed. 106."  . mysql_error() );
while($row = mysql_fetch_array($result))


//$result_no=mysql_query("select count(*) as tot from news_master_tl entType ='lm' AND entSts ='Y' AND entCode ='$row[entCode]' ");
//$TotalReg = $row[TotalReg];


<tr onmouseover="'yellow' " onmouseout="'white'"  >

<td style="border: 0px solid gray;"><a href="home.php?page=classi&type=tit"><?php echo $row['aa']?></a></td>
<td style="border: 0px solid gray;">0</td>


Connection to database table failed. 106.No database selected