• Categories
    • PHP
    • phpMyAdmin
    • PHPMailer
    • FFMpeg
    • PHPEXcel
    • PHPDoc
    • PHPUnit
    • CakePHP
    • CakePHP 2.0
    • Cake PHP 2.1
    • CakePHP Model
    • Facebook PHP SDK
    • composer-php
    • PHP 7
    • PHP GD
    All Categories
  • About

Reload parent page after submit in iframe

javascriptphpjqueryhtmliframe


PHP Snippet 1:

<form method="POST" action="getForm.php">

PHP Snippet 2:

<?php

    $input = $_POST['input'];
    // process form and do your stuff etc

    echo "<!DOCTYPE html>";
    echo "<head>";
    echo "<title>Form submitted</title>";
    echo "<script type='text/javascript'>window.parent.location.reload()</script>";
    echo "</head>";
    echo "<body></body></html>";

?>

PHP Snippet 3:

window.parent.location.reload();

Related Snippets

Adding the custom page with add_menu_page function on Wordpress

Laravel Sanctum CSRF not authenticating

Getting error: CodeIgniterDatabaseBaseResult::getResult in CodeIgniter

Exact alternate to mcrypt_encrypt in PHP 7.2

How to add class name to an existing tag in php

Sort multidimensional array by column value within a column

Transpose and flatten two-dimensional indexed array where rows may not be of equal length

PHP each() function replacement

Error Class "LaravelFortifyFeatures" not found

protect my blog content

Create a new line whenever an array value reaches more than 10 characters

PHP/HTML: Creating A SubMenu

Laravel Factory not calling callback 'afterCreating'

How to pass security cloudflare server with php curl

Twig - How to check if variable is a number / integer

About Contact Privacy policy Terms and conditions