• 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

SendGrid: Sending an email to multiple recipients without other emails being shown on the "to" field

Cant seem to get the Pagination to work on my WooCommerce REST API application?

Read users and passwords from a txt file

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

Using if(isset($_POST['submit'])) to not display echo when script is open is not working

Yii Ajax Submit button

Could not decode a text frame as UTF-8.

ConstraintViolationListInterface to Exception in Symfony

zsh: command not found: php

phpmyadmin : Depends: php-twig (>= 2.9) but 2.6.2-2 is to be installed. WHAT?

phpMyAdmin ERROR: mysqli_real_connect(): (HY000/1045): Access denied for user 'pma'@'localhost' (using password: NO)

disable two buttons after clicking another button

Center point of multiple gps coordinates with php

Symfony 4: "Autowire: you should configure its value explicitly."

PDOException SQLSTATE[HY000] [2002] No such file or directory

About Contact Privacy policy Terms and conditions