I think your example should work. I installed two pastefrom.com pasteto.com virtual hosts on my localhost.
http://pastefrom.com/index.html :
<!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-type" content="text/html; charset=utf-8" /> <title>test</title> </head> <body> <iframe name="iframe" id="iframe" src="http://pasteto.com/index.php" width="500" height="500"></iframe> <form action="http://pasteto.com/index.php" method="post" target="iframe"> <input type="text" name="search" value="google" /> <input type="submit" value="submit"/> </form> </body> </html>
http://pasteto.com/index.php :
<pre><?php var_dump($_POST);?></pre>
And on sending it shows the data for publication on pasteto.com
array(1) { ["search"]=> string(6) "google" }
source share