I have a form that reloads the page with the updated data:
<form name="form" method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>">
...
<input type="submit" name="Submit" value="Update data">
</form>
When the page is updated I want to display a message "Data updated". There was something like this with Referer I beleve, but can't remember.
btw I am also using:
if (isset($_POST['Submit'])) {
// prevent resending data
header("Location: " . $_SERVER['PHP_SELF']);
}
to avoid the annoying resending data message when the user clicks the back button. Is this correct?