If you want to get something from your MySQL database, you will have to connect to it and then query it:
$connectionString = mysql_connect('host', 'MySQL username', 'MySQL Password');
$selectDatabase = mysql_selectdb('MySQL Database Name', $connectionString);
$tableGetQuery = mysql_query("SELECT * FROM `table` WHERE `field` = 'value'");
$tableGetArray = mysql_fetch_array($tableGetQuery);
$tableFieldValue = $tableGetArray['field_name'];
$tableAddQuery = mysql_query = "INSERT INTO `table` (`field_name`, `other_field_name`) VALUES ('value1', 'value2')";
But if you want to upload and download files just use normal HTML file upload element and PHP code:
if($_POST['submit'])
{
if($_FILES["file"]["error"] > 0)
{
$msg = "Error: ".$_FILES["file"]["error"];
}
else
{
if(file_exists("upload/".$_FILES["file"]["name"]))
{
$msg = "The file already exists!";
}
else
{
move_uploaded_file($_FILES["file"]["tmp_name"], "upload/". $_FILES["file"]["name"]);
}
}
}
And to download the file just navigate the the location of the file
'www.yoursite.com/upload/uploaded_file.txt'
If you wanted to store the uploaded file in a MySQL data base, in the file upload code, just add the MySQL connection settings and place the 'INSERT INTO' query either before of after the moving of the file from the temporary directory. Because that is what I have done.
Hope it helps.