username
is a reserved SQL keyword. You should avoid using such as table or column name. To avoid the error you must quote the name or (for column names) prepend the table name:
$resultX = $conn->prepare("SELECT profile_pic FROM admin_credentials WHERE admin_credentials.username=$currentuser");