[thelist] deleting php vars

Jon Haworth jon at laughing-buddha.net
Mon Nov 3 04:17:13 CST 2003


Hi Jan,

> unset ( $HTTP_POST_VARS['var_name']);
>
> looks promising, but when i refresh the page, the vars are
> still there, Still dont know how to prevent people to refresh
> the page and thus executing the same php-code with the
> same vars twice.  :-(

How about including a hidden field in the original form with a unique ID of
some sort - use $_SERVER['UNIQUE_ID'] if it's available on your system, but
mktime() will do if it's not. If you log this ID somewhere when you
originally process the form, you can check any submitted data against your
log to see if it's already been processed.

HTH
Jon




More information about the thelist mailing list