Error occurred here was due to the use of single quotes ('). You can put your query like this:
SELECT * FROM Users
LIKE '".mysql_real_escape_string ($username)."'
It's using mysql_real_escape_string for prevention of SQL injection. Though we should use MySQLi or PDO_MYSQL extension for upgraded version of PHP (PHP 5.5.0 and later), but for older versions mysql_real_escape_string will do the trick.
Hope it helps!!