php post on same page code example
Example 1: javascript get all script tags on page
var scripts = document.getElementsByTagName("script");
for (var i = 0; i < scripts.length; i++) {
if (scripts[i].src) {
console.log(i, scripts[i].src);
} else {
console.log(i, scripts[i].innerHTML);
}
}
Example 2: php post variables to another page with submit button php
<html>
<form id="form" action="webAddressYouWantToRedirectTo.php" method="POST">
<input type="hidden" name="expectedPOSTVarNameOnTheOtherPage" value="<?php echo $varYouMadePreviouslyInProcessing ?>">
</form>
<script>
document.getElementById("form").submit();
</script>
</html>