You should change the line where you are making the query:
from that:
$checkUserQuery = mysql_query("SELECT * FROM users WHERE username='$username'");
to:
$checkUserQuery = mysql_query("SELECT * FROM users WHERE username=".$username);
This should help you to get the desired result...
Before doing that you were sending the text $username and not the value of the variable $username to the sql query.
Anyway, use the function
var_dump($username);
in order to see the contents of almost anything in php... It will help you a lot...
Hope this helps.
:thumbsup: