I assume the table name (vb3_user) is correct?
PHP Code:
$query = "SELECT * from vb3_user where 1 and username like '$username'";
You should better change this to
PHP Code:
$query = "SELECT * FROM vb3_user WHERE username = '$username'";
Also replace
PHP Code:
$result = mysql_query($query);
with
PHP Code:
$result = mysql_query($query) or die('Query not successful: ' . mysql_error());
to see what's going wrong with the query.