Re: Sending Files Via web
| From: | Loic | Date: | Sun, 13 Aug 2000 06:08:38 +0000 |
| Subject: | Re: Sending Files Via web | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-11498@lists.php.net to get a copy of this message | ||
header() has to be sent before any output of html ot php
you may refer to the manual of php on php.net
"David Costelloe" wrote in message <001101c004eb$f037ac60$0201a8c0@zeus>...
Hi,
I have a php which recieves an http_post_vars variable from another HTML I
then use a select case to determine which file is to be sent based upon a
database entry.
This works great only when I try to use the header function it returns the
error already being used.
Here is the example:
<%
$strfileto = HTTP_POST_VARS["txtProduct"];
switch ($strfileto)
Case "Agent Reader":
$strfileto = http://www.test.com.pro1.zip;
$strfilename = $strfileto;
default"
}
then I load the HTML
</html>
<%
If (strfilename > "" )
{
header("Location: strfileto");
}
%>
no matter where I put the header the error occurs saying I'm already
asigning a header or the page returns a 404
Is there a more efficent way to send files rather than using the header
function?
Thanks
David............