I am investigating a project that could be sql injected (one user reported it).
Here is part of login script:
$loginemail = $_POST['loginemail'];
$loginemail_sql = mysql_real_escape_string($loginemail);
$password = $_POST['loginpass'];
$password_sql = mysql_real_escape_string($password);
//get user data
$q = 'SELECT uid, full_name, score, status FROM users WHERE email="'.$loginemail.'" AND password="'.$password_sql.'" LIMIT 1';
I would like to now if this is part of code that could be injected? Is there a problem that $loginemail and $password are treated incorrectly and could contain some dangerouse "SQL parts"?