hi all,
i have a mysql database to upload and download some files. but when i try to download the files, the files are corrupted and only about 50% of the original size and i dont know what went wrong...
could somebody plz help me out?
upload script
<form method="post" action="<?php echo $PHP_SELF; ?>" enctype="multipart/form-data">
<INPUT TYPE="hidden" name="MAX_FILE_SIZE" value="2097152">
<br>File to upload/store in database:<br>
<input type="file" name="form_file" size="40"><br>
</form>
getfilescript
include connect.inc.php; // connect to db
$query = "select file,filetype, filename from xorg_replay where id_replay=$id_replay";
$result = MYSQL_QUERY($query);
$data = MYSQL_RESULT($result,0,0);
$type = MYSQL_RESULT($result,0,1);
$filename= mysql_result($result,0,2);
Header( "Content-type: application");
Header( "Content-Disposition: attachment; filename='$filename'");
echo $data;
can plz anybody help me out?