I searched through the forum and foundno answers, but many similar cases.
this code:
[code=php]<?php include ‘../sessioncheck.php’; ?>
<?php
if(isset($_GET[‘id’]))
{
include ‘../inc/opendb.php’;
include ‘../inc/datesandtimes.php’;
$id = $_GET[‘id’];
$fname = $_GET[‘name’];
$query = “SELECT name, type, size, content FROM documents WHERE id = ‘$id'”;
$result = mysql_query($query) or die(‘Error, query failed’. mysql_error());
list($name, $type, $size, $content) = mysql_fetch_array($result);
header(“Content-Disposition: attachment; filename=$fname “);
header(“Content-length: $size”);
header(“Content-type: $type”);
echo $content;
exit;
} else {
echo ‘<script>window.location.href=”/documents/download.php”</script>’;
}
?>
is being fed an ID & name value from another page. This, in turn, calls a specific file stored IN THE MYSQL DB for download.
This works perfectly in Fire Fox, bur not in IE (both 6 and 7).
In IE I get Internet explorer cannot download downloaddocument.php (that’s the name of the php file, not the attachment)
Internet explorer was not able to open this internet site ….
I should mention that the site is encrypted (https).
Any ideas why?
Thanks.