0

how can we return the result on the iframe with page filled inside the iframe container.

<form action="what.php" method="POST">
<center><input type="text" name="search"/><br/>
<input type="submit" value="Search google" name="submit">
</center></form>
<?php if (isset($_POST['submit'])) 
{ 
$a = '<iframe width="500" height="400" src="http://www.google.com/search?q='.$_POST['search'].'"></iframe>';
echo htmlentities($a);
echo $a;
}
?>

overload:auto didn't worked, What can get to display the result of i am feeling lucky through google search on my iframe :) pardon my ignorance if i am asking a silly question

Dickson Xavier
  • 99
  • 1
  • 1
  • 11
  • I don't understand your question. Do you want to display Google Search Results outside of the iFrame? – D-32 Jun 27 '12 at 07:19
  • Read this [http://stackoverflow.com/questions/8700636/how-to-show-google-com-in-an-iframe][1] [1]: http://stackoverflow.com/questions/8700636/how-to-show-google-com-in-an-iframe – Nuwan Jun 27 '12 at 07:37
  • possible duplicate of [how to open google links inside iframe?](http://stackoverflow.com/questions/7800370/how-to-open-google-links-inside-iframe) – TJHeuvel Jun 27 '12 at 07:51

1 Answers1

1

In response header you will get "X-Frame-Options : SAMEORIGIN". checkout this Mozilla's documentation

Some other similar post

Community
  • 1
  • 1
Nehal
  • 1,004
  • 1
  • 10
  • 33