• 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

Get image type from base64 encoded src string

How to create a individual template for page or post in custom plugin?

How to convert binary string to normal string in php

PHP: Print caught exception like Xdebug

Must be of the type array, null given,

get folder directory from input type file - PHP

What is the difference between client-side and server-side programming?

XSS attack still works despite htmlspecialchars() doing its work

Symfony autowiring issues since docker update

PHP array sort and remove duplicates by two field values

Create a new line whenever an array value reaches more than 10 characters

How to unlink image from folder?

How to Install Composer Require doctrine/dbal

Laravel display validation error

Make Calculator - When Button clicked the No shows in Textbox.

About Contact Privacy policy Terms and conditions