• 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

HTML + PHP + PHPMAILER

How to redirect to another page after n seconds in wordpress without using javascript?

How to downgrade or install a specific version of Composer?

Connecting an HTML webpage to a SQL Server

Message: Set sys_temp_dir in your php.ini after installed composer

Implode columnar values between two arrays into a flat array of concatenated strings

Laravel 5 controller sending JSON integer as string

Redirect to previous page with php

WordPress Security Standards want me to escape my html, but how to do it correctly?

Losing session data after POST from third party website

How to validate tin and cst using PHP?

Laravel Livewire: jQuery not working in child component loaded via @if statement

renameColumn migration fails for existing column with columns does not exist error

I'm trying to use curl with php but getting this error:Could not resolve host: Bearer

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

About Contact Privacy policy Terms and conditions