Skip to main content
replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link
URL Rewriter Bot
URL Rewriter Bot

The easy way:

After saving to database, reload your page:

header('Location: comment-form.php'); 

This will make the browser "forget" the form submit.

The correct way:

Generate a nonce and add it as hidden input in your form. When the form submits, make sure $_POST['nonce'] matches with $nonce in your script.

How to create and use noncesHow to create and use nonces

The easy way:

After saving to database, reload your page:

header('Location: comment-form.php'); 

This will make the browser "forget" the form submit.

The correct way:

Generate a nonce and add it as hidden input in your form. When the form submits, make sure $_POST['nonce'] matches with $nonce in your script.

How to create and use nonces

The easy way:

After saving to database, reload your page:

header('Location: comment-form.php'); 

This will make the browser "forget" the form submit.

The correct way:

Generate a nonce and add it as hidden input in your form. When the form submits, make sure $_POST['nonce'] matches with $nonce in your script.

How to create and use nonces

added 183 characters in body
Source Link
flowfree
  • 16.5k
  • 12
  • 55
  • 79

The easy way:

After saving to database, reload your page:

header('Location: comment-form.php'); 

This will make the browser "forget" the form submit.

The correct way:

Generate a nonce and add it as hidden input in your form. When the form submits, make sure $_POST['nonce'] matches with $nonce in your script.

How to create and use nonces

Generate a nonce and add it as hidden input in your form. When the form submits, make sure $_POST['nonce'] matches with $nonce in your script.

How to create and use nonces

The easy way:

After saving to database, reload your page:

header('Location: comment-form.php'); 

This will make the browser "forget" the form submit.

The correct way:

Generate a nonce and add it as hidden input in your form. When the form submits, make sure $_POST['nonce'] matches with $nonce in your script.

How to create and use nonces

Source Link
flowfree
  • 16.5k
  • 12
  • 55
  • 79

Generate a nonce and add it as hidden input in your form. When the form submits, make sure $_POST['nonce'] matches with $nonce in your script.

How to create and use nonces