You are here: Re: redirect after auto script « PHP Programming Language « IT news, forums, messages
Re: redirect after auto script

Posted by Yves on 02/18/06 19:06

On 2006-02-18 09:09:05 +0100, Jasen Betts <jasen@free.net.nz> said:

> 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

Thanks for you answers ... after a good rest, I discovered that I put
it in the wrong included files ...

pni.php includes pni_succes.php end include pni_error.php
the redirect MUST be writtent at the end of the pni_php !!!

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация