fixed credentials and undefined constant

$_ENV replaced and undefined constants fixed $row['name']