It should be..
PHP:return ((mysql_result($query) == 1) ? true : false);
I believe.
return mysql_result($query) == 1;
Why not?
PHP:return mysql_result($query) == 1;
Shit sorry, edited my post.Get this error with both your solutions :L
Still same error
$query = mysql_query("SELECT COUNT(user_id) FROM users WHERE username = '{$username}' LIMIT 1") or die(mysql_error());
Lawl it broke it more