Justtechjobs.com Find a programming school near you






Online Campus Both


php-db | 2001011

RE: [PHP-DB] Preventing repost From: Boget, Chris (Chris.Boget <email protected>)
Date: 01/03/01

> I need to find a way to prevent a user from hitting 'back' on
> their browser and reposting the form data.

On all forms I need to have this functionality, I include the
following javascript at the beginning (or end):

<script language="php">
  history.forward();
</script>

The first time a user accesses a page, there is no forward history
to go to so nothing happens. But when the user hits the "Back"
button, there is so it jumps them right back to where they were
(the form result page).

Chris