I have read through many other threads about this exact problem, but i for some reason can not solve my problem. Really need some help.
if (!$username||!$passwo
Change:
$check = mysql_query("SELECT * FROM Test WHERE username = '$username'");
to
$check = mysql_query("SELECT * FROM Test WHERE username = '$username'") or die(mysql_error());
And you will see any potential errors that happens in the query.
Also, I would highly recomend using either PDO or Mysqli instead of mysql functions, as they are deprecated and will be removed in future php versions.