Re: header()
- From: Anthony Papillion <papillion@xxxxxxxxx>
- Date: Sat, 29 Nov 2008 12:32:54 -0800 (PST)
On Nov 29, 2:11 pm, "Andrew G. Koptyaev" <kopty...@xxxxxxxxx> wrote:
I have software catalog site.
If I want to download some software I press button with link on page and
goto to php script which increment download value in database and then I want
to redirect to file but all headers already outputed to browser and I can't
use header() function.
I'm not sure why you can't use the header function after a database
query. Doing a query doesn't send any HTTP headers to the browser by
itself. I'd say look at the structure of your script and page. You can
probably do it better where you can use header() in your script.
For example:
$sql = "UPDATE download_count SET download_count='whatever'";
header("Location: downloadprogram.php");
That should work with no problems.
Anthony
.
- Follow-Ups:
- Re: header()
- From: Andrew G. Koptyaev
- Re: header()
- References:
- header()
- From: Andrew G. Koptyaev
- header()
- Prev by Date: header()
- Next by Date: Re: MySQL -> PHP -> MS Excel?
- Previous by thread: header()
- Next by thread: Re: header()
- Index(es):