[Zope] GET vs. POST

Dennis Allison allison@sumeru.stanford.EDU
Fri, 9 May 2003 15:21:15 -0700 (PDT)


Thanks.  Helpful too.  -d

On 9 May 2003, Dylan Reinhardt wrote:

> 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
> 
> 
> 
> 
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://mail.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists - 
>  http://mail.zope.org/mailman/listinfo/zope-announce
>  http://mail.zope.org/mailman/listinfo/zope-dev )
>