2

I have a form in my webpage, if one of the fields is filled and the page reloads then appears
"Confirm Form Resubmission".

enter image description here

I think that it looks ugly, I dont wanna this call in my webpage.


So my question is:

What i have to do to avoid or block that call.
Which language i have to use.


Sorry for my english.

  • http://stackoverflow.com/questions/3923904/preventing-form-resubmission http://stackoverflow.com/questions/3923904/preventing-form-resubmission review these questions – Gergely Králik Jan 16 '14 at 22:00

2 Answers2

0

When someone submits a form, save $_POST in a $_SESSION variable, then redirect the user to the same page. When you actually process the form itself, then you can delete the $_SESSION variable.

Niet the Dark Absol
  • 320,036
  • 81
  • 464
  • 592
0

You can either force reload the page in PHP like this

echo '<meta http-equiv="refresh" content="0">'

Alternatively, you can send it to another page in PHP, like this

header( 'Location: path/to/file.php' );
scrblnrd3
  • 7,228
  • 9
  • 33
  • 64