Forum Moderators: coopster
Here are the errors:
PHP Notice: Undefined index: save
PHP Notice: Undefined index: dir
PHP Notice: Undefined index: media
The lines of code that are being referred to are:
$save =$_REQUEST['save'];
$dir = $_REQUEST['dir'];
$set = $_REQUEST['media'];
Any help would be appreciated.
if ($save == 'yes') {
$file = "./$media";
header('Content-Description: File Transfer');
header('Content-Type: application/force-download');
header('Content-Length: ' . filesize($file));
header('Content-Disposition: attachment; filename=' . basename($file));
readfile($file);
exit();
}
if (isset($_GET['save']) AND $_GET['save'] == 'yes') {
$file = "./$media";
header('Content-Description: File Transfer');
header('Content-Type: application/force-download');
header('Content-Length: ' . filesize($file));
header('Content-Disposition: attachment; filename=' . basename($file));
readfile($file);
exit();
} else {
echo 'error';
}