header question

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
kinGh
Forum Newbie
Posts: 3
Joined: Thu Aug 07, 2008 9:58 pm

header question

Post by kinGh »

Hello all
My question is about header and it's in iframe but when it's redaite it need to be in top so i try like in the code below but it did not work out
header("Location: target=_top index.php"); :banghead:
how the code it showed to be
thank you
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: header question

Post by Christopher »

You will probably need to use Javascript for that.
(#10850)
kinGh
Forum Newbie
Posts: 3
Joined: Thu Aug 07, 2008 9:58 pm

Re: header question

Post by kinGh »

echo "<script>location.replace('index.htm');target=_top</script>"; 8O
i tried with java script but it did not work as well
or do u have any command in mind let us know thanx hope/looking for help and more to know
kinGh
Forum Newbie
Posts: 3
Joined: Thu Aug 07, 2008 9:58 pm

i found it

Post by kinGh »

thanks arborint for giving idea about Java to use in this and here the right code
echo "<script>top.location.replace('https://www.yoursite.com/');</script>";

Hope will help some bady
Regards
Post Reply