• 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

selected value from the listbox in php

Pass an image through AJAX [duplicate]

Unable to run composer install

image source not readable

How to remove from a multidimensional array all duplicate elements including the original?

nginx err_connection_refused, can anyone help me?

Toggle between a textbox and a select using PHP

*** ERROR *** The PHP configuration loaded file is: c:/wamp64/bin/php/php8.1.0/php.ini - should be: c:/wamp64/bin/apache/apache2.4.53.1/bin/php.ini

How to use React Router with Laravel?

PHP block shortcut in Visual Studio Code

(PHPUnit) PHP Fatal error: Uncaught Error: Call to undefined function each()

Form Validation and Submission to database

Sort a multidimensional array by integer inside of a string value which is two levels down

How to keep value of selected value after form submission?

SMTP "Error: DATA not accepted from server!" Opencart 2.3 on InMotionHosting

About Contact Privacy policy Terms and conditions