Skip to content

Comment on How best to navigate to a PHP page after a form submit?

Comments

I also use the header() call to send an HTTP response code. Most of the time, I want my users to be able to retrieve the information on that page later (say it's an order number / summary / etc.) Lots of people will copy the URL in their browser bar; if you do a server side alteration, at the same URI, for different content, it cannot be distinguished.

OTOH, sometimes you just want a "thank you" page, with no info on it. And you want people returning to the site to see the form, rather than the thank-you. Then, IMO, it's appropriate to do a server side include of the content in question.

I agree with all that, but how do you solve the problem I posed initially?

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.