Take for example this
$username = mysql_real_escape_string($_GET['username']);
$password = mysql_real_escape_string($_GET['password']);
$sql = "SELECT * FROM users WHERE username = $username AND password = $password";
If there are no quotes around $username and $password, is injection still possible ?
Yes.
mysql_real_escape_string()prevents only escaping from the quotes in a string.Without surrounding quotes,
mysql_real_escape_string()is useless.