Re: Need some help on header refresh...
- From: Jerry Stuckle <jstucklex@xxxxxxxxxxxxx>
- Date: Sat, 03 Mar 2007 08:47:20 -0500
Justin wrote:
On Mar 3, 11:29 am, Jerry Stuckle <jstuck...@xxxxxxxxxxxxx> wrote:Justin wrote:Harlow... i need some help on these... im actually trying to do a pageYou can use header() calls to redirect, but it is incompatible with
using php... the function is to receive certain parameters from a 3rd
party provider... and i need to redirect my page to another page after
certain validation. it's ok when i use the url to do the testing...
the validation part works fine... scenario as below:
if situation a, echo abc
if situation b, echo abc then refresh to another page.
the problem is after the 3rd party call my page the refresh doesnt
work... after doing some amendments, it redirects to another page but
doesnt echo abc... so any other way to redirect the page??? tried
output buffer start and flush but still couldn.... SOS...
Regards,
Justin
echo(). You can't send ANY output to the browser before a header() call.
But if you're redirecting, any output you send would not be displayed
anyway - so why bother sending it?
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstuck...@xxxxxxxxxxxxx
==================
er... the requirement from my 3rd party provider is that i have to
reply -1 once receive the parameters from them.. so i put echo -1. is
there any other way to send instead of echo? the redirecting part is
something i wan to add on... it's not in the API they provided...
OK, you have to respond with a -1. But once you send ANY output, you can't use a header() call.
header() must be called before the headers are sent to the browser. And any output - even white space - will cause the headers to be sent. So you can either send a response or do the redirect. But the HTTP protocol (not PHP) won't let you do both.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@xxxxxxxxxxxxx
==================
.
- Follow-Ups:
- Re: Need some help on header refresh...
- From: Rik
- Re: Need some help on header refresh...
- From: rob . brown
- Re: Need some help on header refresh...
- References:
- Need some help on header refresh...
- From: Justin
- Re: Need some help on header refresh...
- From: Jerry Stuckle
- Re: Need some help on header refresh...
- From: Justin
- Need some help on header refresh...
- Prev by Date: Blocking with fopen when file is already open for writing
- Next by Date: Re: Multiple Statements in a query
- Previous by thread: Re: Need some help on header refresh...
- Next by thread: Re: Need some help on header refresh...
- Index(es):
Relevant Pages
|