Yeah, ok they're two different things. However if I add:
echo '<head><title>row['name']</title></head>';
Here:
$result = mysql_query("select name, size, type, content from file where userid=" . $_SESSION['user_id']);
$row = mysql_fetch_array($result);
echo '<head><title>row['name']</title></head>';
header("Content-length: " . $row['size']);
header("Content-type: " . $row['type']);
header("Content-Disposition: inline; filename=\"" . $row['name'] . "\"");
echo $row['content'];
And try to open a PDF-document that's stored in my database Adobe Reader tells me the file is corrupted. I figured this was so because it only wants the response-headers and nothing else. I had a problem earlier where I had a blank space in download.php which corrupted all my files.
If I try to open a TXT-file it succeeds but I get the words "echo '<head><title>Page Title</title></head>';" at the top in the text of the file (not browser title), so yeah: Everything that's echo'd in the download.php-file is printed to the file I'm displaying it seems.
That's why I thought I wanted to send the title in headers in some way. Isn't this possible, or am I missing something else?