Ok, how is this not working?

check file (skipped over some variables:

$sql = "SELECT * FROM $tbl_name WHERE username='$username' AND password='$password' LIMIT 1";
$run = mysql_query($sql);
$count = mysql_num_rows($run);

if ($count > 0) {
session_start();
$_SESSION['user'] = $username;
header('Location: apage.php');
die();
}
else {
header('Location: home.php');
die();
}

//It doesn't work?!