Re: header()
- From: Jerry Stuckle <jstucklex@xxxxxxxxxxxxx>
- Date: Sat, 29 Nov 2008 18:54:29 -0500
Andrew G. Koptyaev wrote:
"Jerry Stuckle" <jstucklex@xxxxxxxxxxxxx> ???????/???????? ? ???????? ?????????: news:ggsap4$4fl$1@xxxxxxxxxxxxxxxxxxxxxxAndrew G. Koptyaev wrote:"Anthony Papillion" <papillion@xxxxxxxxx> ???????/???????? ? ???????? ?????????: news:78a9bcc1-b43c-4ab8-99be-6cf0240c4430@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxIt sounds like your flow planning needs some work. You need to make a decision as to what you want to do - put out messages(s) or redirect. As you found, you can't do both.
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 info
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.
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.
jstucklex@xxxxxxxxxxxxx
==================
.
- Follow-Ups:
- Re: header()
- From: transpar3nt
- Re: header()
- 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
- header()
- Prev by Date: Re: php form and ssi
- Next by Date: Re: php form and ssi
- Previous by thread: Re: header()
- Next by thread: Re: header()
- Index(es):