Force download mp3, not downloading full file.....pls help

Hello,

I have the following code to force download mp3 file. the code is working fine but its only downloading 799 bytes. I am new in php and not able to figure out the problem. please help me to sort it out. thanks.


<?php
                include "dbconnect.php";
                $link=dbconnect();
                $cat=$_GET['catagory'];
                $id=$_GET['id'];

                $query=("select *from $cat where id='$id'");
                $result=mysql_query($query);
                $row=mysql_fetch_array($result);
                $file = $row["link"];
                header ("Content-type: octet/stream");
                header("Content-Disposition: attachment; filename=\\"".basename($file)."\\";" );
                header("Content-Length: ".filesize($file));
                readfile($file);
                exit;
?>

So in other words it IS NOT working fine.

Download it again, save it. Now, with that small file of 799bytes, OPEN IT in a text editor.

I bet you’ll find an error message in there.

Find it? - What was the error?