• 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

How to find the date a user created their Google account

Popup Window and PHP form

woocommerce_wp_select options array from product attribute terms

"Unable to load dynamic library 'pdo_sqlsrv.so' "Cenos7 PHP7.2.10

hidden INPUT value not available in $_POST

How to add automatically collapse/expand in content wordpress (single.php)?

Is there a way to correctly use sanitize_text_field and wp_unslash that doesn't cause psalm to error with "expects string, possibly different type"

best way to store error messages in Laravel (session or variable)

Two buttons one form

Shopify password update using Shopify API

Form repeater send wrong data with last element in Laravel

onKeyUp event calculation not working on the following rows from php generated forms except the first one

MySQL default time format UTC or GMT?

Symfony redirect if already loggedin from login page

How to get median and quartiles/percentiles of an array in JavaScript (or PHP)?

About Contact Privacy policy Terms and conditions