• 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

PHP array_filter with arguments

Fatal error: [] operator not supported for strings

Form repeater send wrong data with last element in Laravel

Multiply each value in array using array_map function

Add Class in html Dynamically in PHP

json_encode turns array into an object

Xdebug can't connect back to Docker host

Add custom text under order details on WooCommerce My account view order pages

Boolean assignment operators in PHP

error:14094410:SSL routines:ssl3_read_bytes:sslv3 alert handshake failure

Unsure why I am getting: Number of variables doesn't match number of parameters in prepared statement

Use Python plotly chart in PHP

Laravel websockets AWS EC2 - Connection failed

How to change HTML structure inside WP <head>

MySQL order by field in Eloquent

About Contact Privacy policy Terms and conditions