• 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

xdebug 3 not working in ubuntu 20.04 with docker

Problem with fetching data from database in Laravel

Check If array is null or not in php

Laravel Mix Uncaught ReferenceError: $ is not defined

Adding reCAPTCHA v2 into my PHP file

Override default Auth routes in Laravel 7

Undefined variable in Laravel 8 project (php 7.4)

Exception thrown during the rendering of a template("Parameter "id" for route "url" must match "[^/]++" ("" given) to generate a corresponding URL.")

CodeIgniter 4: Like and Dislike Functionality

Laravel Mix Uncaught ReferenceError: $ is not defined

advanced custom fields wordpress custom class

sqlsrv_num_rows() expects parameter 1 to be resource, boolean given

Yii Ajax Submit button

Convert PHP array into HTML tag attributes separated by spaces

How to submit a form when page loads using JavaScript?

About Contact Privacy policy Terms and conditions