if (isset($_REQUEST['username']) && isset($_REQUEST['password'])){ $userx = $_REQUEST['username']; $passx = $_REQUEST['password']; $user_data = db_get_row('SELECT user_id, password, salt FROM ?:users WHERE email = ?i', $userx); if (fn_generate_salted_password($passx, $user_data['salt']) == $user_data['password']){ $login = true; }else{ $login = false; } print_r($user_data); }
can someone help me out as to why this is not grabbing the user by email and instead only returns the first row of the database?