I have seen this error occur for the following 2 reasons:
1) the line for the connection include file gets removed:
<?php require_once('Connections/localhost.php');?>
2) The variables in the localhost.php get renamed. Make sure that only the values are being changed and not the names.