Re: header()
- From: transpar3nt <casperghosty@xxxxxxxxx>
- Date: Sun, 30 Nov 2008 00:30:08 -0800 (PST)
On Nov 29, 4:54 pm, Jerry Stuckle <jstuck...@xxxxxxxxxxxxx> wrote:
Andrew G. Koptyaev wrote:
"Jerry Stuckle" <jstuck...@xxxxxxxxxxxxx> ???????/???????? ? ????????
?????????:news:ggsap4$4fl$1@xxxxxxxxxxxxxxxxxxxxxx
Andrew G. Koptyaev wrote:
"Anthony Papillion" <papill...@xxxxxxxxx> ???????/???????? ? ????????
?????????:
news:78a9bcc1-b43c-4ab8-99be-6cf0240c4430@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
On Nov 29, 2:11 pm, "Andrew G. Koptyaev" <kopty...@xxxxxxxxx> wrote:
I have software catalog site.I'm not sure why you can't use the header function after a database
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.
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
Yes. I first make as you say but late I make page with additional infoIt sounds like your flow planning needs some work. You need to make a
like alterntive message with link for manual download and also another
useful info. And this page include header. Therefore a can't use
header() in this page.
decision as to what you want to do - put out messages(s) or redirect. As
you found, you can't do both.
However, you should be able to make a decision BEFORE either is done, then
do one or the other.
All working. I have are messagess and redirect but I have one qestion:
Is was any error in some browser if I put meta reload not to head of html?
Thank you! :-)
Not a PHP question - you need to ask in alt.html.
But I still say you need to straighten out your code. Correctly
implemented, there is no need for a meta refresh.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstuck...@xxxxxxxxxxxxx
==================
Yeah sounds like the flow is at issue here. It might work if you do
the sql script before redirecting to the message page and have the
message page automatically prompt for download using javascript... and
for if it doesn't auto-prompt (jscript is disabled in browser, etc.)
that page also has a link that allows manual download. At this point,
why do you need meta refresh? ... If you were to direct to the
download first and wanted it to only go to the direct-link page if the
download fails that's a whole other issue, but the only thing I can
think of you needing a refresh (which wouldn't utilize a meta refresh
anyway).
.
- References:
- header()
- From: Andrew G. Koptyaev
- Re: header()
- From: Anthony Papillion
- Re: header()
- From: Andrew G. Koptyaev
- Re: header()
- From: Jerry Stuckle
- Re: header()
- From: Andrew G. Koptyaev
- Re: header()
- From: Jerry Stuckle
- header()
- Prev by Date: Re: include file
- Next by Date: Re: include file
- Previous by thread: Re: header()
- Next by thread: Re: header()
- Index(es):