moved mysql connection functions to api.php, and created config.example.php