You are here: Re: changing URLs after form submit « All PHP « IT news, forums, messages
Re: changing URLs after form submit

Posted by Martin Jay on 05/18/06 19:25

In message <Qn0bg.14997$z%.13147@newsfe5-win.ntli.net>, ED
<ed@example.com> writes
>"Martin Jay" <martin@spam-free.org.uk> wrote in message
>news:gpN0+7GOpFbEFwEo@onenet.org.uk...

>> And technically you should also add a reason for the redirect, such as
>>
>> header ('HTTP/1.1 302 Moved Temporarily');
>> header ('Location: ../thankyou.php');
>>
>> But in reality the first line can be left out.
>>
>> Do you really need to do a redirect, though? HTML and PHP code can be
>> mixed. Perhaps it would be easier to simply include the HTML after the
>> PHP code in the same file.

>Also technically, the Location header should point to an absolute url, ie:
>header('Location: http://www.mydomain.com/thankyou.php');

Ah, thanks for pointing that out. I don't think I've ever done a
redirect in my own code, but I've seen it done in other people's PHP
code I've amended.
--
Martin Jay

 

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

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