1:
$lvl = mysql_query("SELECT level FROM `user` WHERE name = '$nick'");
$lvl = mysql_result(mysql_query("SELECT level FROM `user` WHERE name = '$nick'"),0);