[php] mysql_fetch_array()/mysql_fetch_assoc()/mysql_fetch_row()/mysql_num_rows etc... expects parameter 1 to be resource

Please check once the database selected are not because some times database is not selected

Check

mysql_select_db('database name ')or DIE('Database name is not available!');

before MySQL query and then go to next step

$result = mysql_query('SELECT * FROM Users WHERE UserName LIKE $username');

f($result === FALSE) {
    die(mysql_error());