[Zope] GET vs. POST
Dylan Reinhardt
zope@dylanreinhardt.com
09 May 2003 14:45:21 -0700
On Fri, 2003-05-09 at 13:00, Dennis Allison wrote:
> How do you transfer information via post when using
> REQUEST['RESPONSE'].redirect?
>
Don't do that... redirects are generally to be avoided and re-posting
data is a particularly bad application.
The page (object) that catches the form is the URL that should appear to
the user. Where the information actually comes from is another question
entirely.
Let's say you have the following objects:
some_form (the form)
some_form_proc (the form target)
some_content (what you want returned)
In some_form you have:
<form action=some_form_proc method=post>
<input type=some_field>
Etc., etc.
In some_form_proc you have:
<dtml-var "do_something(REQUEST.get(some_field))">
...
<dtml-var "some_content(REQUEST)">
And then just put whatever context-sensitive code in some_content you
want to see returned. All done!
HTH,
Dylan