• 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 latest Tweets - What API

Can't find vendor/autoload.php for Ratchet

Star rating with half star support

XAMPP keeps showing Dashboard/Welcome Page instead of the Configuration Page

JQuery content editable div and text box on submit not sending POST

Upload a file Using PHP and JavaScript

(Laravel) How to delete multiple models including optional relationships?

Clear javascript source cache laravel 5.8

Fatal error: Uncaught mysqli_sql_exception: Unknown database 'test' in ... (How do I fix that? Using PHP)

Best way to scrolldown onpageload

Fatal error: Trait 'LaminasDbAdapterLaminasDbAdapterAdapterInterface' not found in /var/www/vendor/laminas/laminas-db/src/Adapter/Adapter.php

PHP: convert all UTF-8 characters to HTML entities

Additional price based on cart item count in WooCommerce

SQL AVG() to 2 decimals

Symfony - EasyAdmin - Add and remove functions are ignored from AssociationField

About Contact Privacy policy Terms and conditions