| 
 Posted by Jasen Betts on 02/18/06 10:09 
On 2006-02-17, Josselin <josselin@wanadoo.fr> wrote: 
> I  have a page 'pni.php' to which paypal is redirecting after payment 
> thsi page contains a db update script, no problem it's running well 
> 
> but once this script is executed (transparently for the use, as there  
> is nothing to display) 
> how can I redirect to another page ? 
> 
> header redirect can only be placed at the beginning of the page... not  
> at the end 
> I've already writen redirection but only when there was a form inside  
> and a user action.. to refresh the page , this is not the case ...  :-(( 
 
headers must come before any emitted content. 
but needn't come at the start of the script. 
 
if the script produces no output you can put the header() call anywhere. 
 
> pni.php 
><? 
> DN update script from  Paypal  _POST data 
> ... 
> (no display, no user action) 
> .. 
> auto redirect to another page ?  -> index.php 
> ?> 
 
you can put the header at either end of the script. it makes no difference 
as long as it has no produced content before it. 
 
Bye. 
   Jasen
 
[Back to original message] 
 |