The error occurs because connect.php now has no idea what $username or
$password refers to. You need to inform PHP that before it tries to do anything
in connect.php, it’s required to load app_config.php. And that’s (almost) exactly
what you type in your script: