Reply to Re: Submit form with variable for action?

Your name:

Reply:


Posted by John Dunlop on 09/30/05 22:53

Joseph S. wrote:

> header("Location: http://www.{$_POST['domain']}");

In the absence of a different status code, that will send a 302 (temporary
redirect). But the HTTP1.1 spec warns that some browsers treat 302
responses as if they were 303s, meaning that they issue a GET request no
matter what the first method was, be it HEAD, POST, whatever. Any
information POSTed the first time around wouldn't be sent again.

Your solution suggests that not all browsers treat 302s like that, that
some stick with POST.

To disambiguate this, in theory at least, HTTP1.1 provides the 303 and 307
status codes. 303 is for when user agents should perform a GET on the
Location URI, 307 for when they should continue using the same method as
before (possibly involving user interaction). Some browsers don't grok
these though. More details at

http://www.ietf.org/rfc/rfc2616

--
Jock

[Back to original 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

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