Posted by Janwillem Borleffs on 09/29/04 11:18
thamood@gmail.com wrote:
> the idea is to optain the id through the "$_GET" and then get the path
> of the file from the DB ...but then what?the "header()" function wont
> work unless its the 1st function to be called so i cant query the DB
> for the file path then call it!! or is there any other function i can
> use to send the file to the user ???? can any one help me plzzzzzz
> it's drivin me nuts... :))) thnx in advance...
You obviously have miss-interpreted the info on http://www.php.net/header.
You cannot call header after any output, but you can call as many functions
you like before calling header() as long as they do not produce any output.
So, the following will fail:
<?php
echo strtoupper("hello");
header("Location: http://www.google.com");
?>
And the following will succeed:
<?php
strtoupper("hello");
header("Location: http://www.google.com");
?>
JW
Navigation:
[Reply to this message]
|