The values used by the $WA_connectionDB and $WA_connection variables are pulled from the database connection file. Look for a line similar to:
<?php require_once('Connections/localhost.php'); ?>
and make sure it is at the top of you php script. The name of the file in the connections folder will be different on your computer depending on the name of the connection you are using.