+3  A: 

$backresult is PHP's connection to the result of your query. If you want to check that $backresult contains no rows, you need something like

if(mysql_num_rows($backresult)==0) {
 //inactive link
} else {
 //active link
}
dnagirl
+1  A: 

You don't need while() statements if you're only working with a single row. And yes, as posted above you test if a query returned any rows with mysql_num_rows($result), you can test if individual fields are empty with empty($result['fieldname']).