"SELECT username FROM users WHERE username='" . $username . "'"
no
"SELECT username FROM users WHERE username='' . $username . ''"
Pero considere cambiar a sentencias parametrizadas con mysqli o pdo
"SELECT username FROM users WHERE username='" . $username . "'"
no
"SELECT username FROM users WHERE username='' . $username . ''"
Pero considere cambiar a sentencias parametrizadas con mysqli o pdo