cgi form submission

Oleg Broytmann phd at phd.russ.ru
Wed Mar 15 11:22:15 EST 2000


On Wed, 15 Mar 2000, sp00fD wrote:
> I've got a cgi program that takes input and submits it to a database,
> when this happens, rather than send the user to some useless page
> like "info added" or something, I redirect to the page that would
> normally be used to view the info.  The problem is that, if the user
> reloads the page for some reason, the info is entered into the database
> again.  Is there an easy way to prevent this from happening?

   First, this is client-side issue, and there is no way you can manage it
from a server. Different browsers just do it differently.

   Second, most browsers forget the form if you redirect to another page.
>From this point of view the page "info added" is not so usless, yeah? :)

   Thired, such pages are not useless from user-friendliness - you confirm
that the info passed, so user can continu to work without worries.

   So, I recommend to redirect to "Thanks, the info added. Continue here >>>"

Oleg.
---- 
    Oleg Broytmann      Foundation for Effective Policies      phd at phd.russ.ru
           Programmers don't die, they just GOSUB without RETURN.





More information about the Python-list mailing list