Skip to content

Instantly share code, notes, and snippets.

@steveobbayi
Created February 7, 2017 17:05
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save steveobbayi/fa31bb9e2a3134ffb7b90f10319ed3de to your computer and use it in GitHub Desktop.
<?php
// validate input is from the form.
// Note: no other validations have been done
if ($_POST["page2control"] == "authorized")
{
?>
<form id="page2form" target="iframe-name" method="post" action="process-form-data.php">
<input name="text" value="<?= $_POST['text'] ?>">
</form>
<!-- the javascript to repost the form -->
<script type="text/javascript">
$(function(){
$("#page2form").submit();
});
</script>
<?php
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment