• 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

Remove categories with all childs derived from parent category

PHPUnit (Phar) Fatal Error Only When Test Fails

Adding hreflang tags automatically in WordPress subdirectory multisite

Update Total in checkout of Woocommerce with Ajax Request

Converting array to string and then back in PHP

Batch request Google Calendar php API

I want to display default profile image if user do not have profile image

jQuery Ajax Post with data

PHP web3 ERC20 token function call

PHP block shortcut in Visual Studio Code

PDOException: PDO::__construct(): php_network_getaddresses: getaddrinfo failed: no such host known

dompdf and img tag, image wont show

How in Laravel run JavaScript code stored in php variable?

How do I pass the dynamic output of a php variable or php function to a CSS variable?

Detect if PHP session exists

About Contact Privacy policy Terms and conditions