[nycphp-talk] back button, page timeout, sessions
Chris Shiflett
shiflett at php.net
Fri Jan 30 15:09:18 EST 2004
--- "Nunez, Eddy" <enunez at tiaa-cref.org> wrote:
>
> > The intermediate "page" generates no output and has:
> >
> > header('Location: http://newurl/');
>
> This means you need to transfer any form data via the
> redirected link, essentially turning a POST into a GET. no?
No, you just do whatever you need to do with the form data on the
intermediate page. This approach is much more difficult if you don't have
a very good separation of presentation and logic, so it may not be a good
choice for you.
The idea is to do whatever you need to do with the data, and then you
redirect to a "dumb" page that handles the presentation. Redirects require
a separate HTTP transaction, so you should not make a habit of it, but
they can be good for things like this.
Hope that helps.
Chris
=====
Chris Shiflett - http://shiflett.org/
PHP Security Handbook
Coming mid-2004
HTTP Developer's Handbook
http://httphandbook.org/
More information about the talk
mailing list