I have looking for ways to let the user backup database files. I stumbled upon this code:

PHP Code:
<?php
include 'config.php';
include 
'opendb.php';

$tableName  'mypet';
$backupFile 'backup/mypet.sql';
$query      "SELECT * INTO OUTFILE '$backupFile' FROM $tableName";
$result mysql_query($query);

include 
'closedb.php';
?>
I have a few questions here; what are the config, opendb and closedb.php files and why are we calling them? Are they inbuilt or created by the programmer?

I don't want to backup the files to the same drive where the files currently reside. I want the user to select a location/drive on his computer. And then save this path/location ....something like...$backupFile = D:/secure/backup.sql. How is this possible?

Does the above quoted procedure export the database with structure and data to an sql format?