I am creating application in facebook using iframe. In that i want to redirect from one page to another. i m using following code:
<fb:redirect url='http://....' />
but this is not working and instead of redirecting it stays on same page.
so i used following code:
header("Location: http://.......");
this is working properly but problem is that it doesn’t open in full window it opens in main window i.e address of first page in address bar and in that page in square it opens second page that is redirected to. can we give target=”_top” attribute in header function of PHP
Please help me….
You need to add die();
Your current page will not stop rendering when you change any header. It will just set the header – as long as there is nothing already renderd!
Please be sure that you don’t have any html output before setting this header redirection!
And this code will only be executed if the IFrame is reloaded / you click a link or do a form submit to the same page.