• 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

500 Internal Server Error on Ajax request. Not sure the origin of the problem

Submitting a form with ajax in Wordpress

OctoberCMS / Anonymous Global Scope

PHP mail sending empty mails

Transfer data between JavaScript and PHP through JSON

Vimeo API: how to save a vimeo into a subfolder?

How do I call a php file with axios?

how to get value from array in laravel

If you intend you use SMTP, add your SMTP Code after this Line

Laravel print last executed SQL query with Query log

how to loop through json response data using ajax jquery?

Add 2 Webcam in one page with WebcamJS

How to auto populate preferredCountries from intl-tel-input with db output

PHP returning an error message and false

Parsing JSON File to array in PHP

About Contact Privacy policy Terms and conditions