header function

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
User avatar
phpnovice
Forum Commoner
Posts: 25
Joined: Mon Feb 02, 2004 6:47 am
Location: england, london

header function

Post by phpnovice »

when using the header function in php is it possible to set the frame using target or something similar like in HTML. i cant seem to find the right syntax for doing this.

Cheers once again guys!

James

p.s we may need to set up a forum for just my questions alone! :)
User avatar
JAM
DevNet Resident
Posts: 2101
Joined: Fri Aug 08, 2003 6:53 pm
Location: Sweden
Contact:

Post by JAM »

No, you cant. But...

Code: Select all

<frameset rows="100, *">
      <frame src="1.php">
      <frame src="2.php">
  </frameset>
...if 2.php contains a header(), only that frame would change to the new location.
User avatar
phpnovice
Forum Commoner
Posts: 25
Joined: Mon Feb 02, 2004 6:47 am
Location: england, london

Post by phpnovice »

thats why i cant get it to work then. bit annoying but im sure ill find a way around. ive got lots more questions (ive just started playing with sessions) so stay tuned.
Cheers

james
User avatar
JAM
DevNet Resident
Posts: 2101
Joined: Fri Aug 08, 2003 6:53 pm
Location: Sweden
Contact:

Post by JAM »

Hehe, that whats this board is for.
You can also play around using Iframes, not just frames. But even there, "targeting" a (i)frame is impossible afaik.
User avatar
Dr Evil
Forum Contributor
Posts: 184
Joined: Wed Jan 14, 2004 9:56 am
Location: Switzerland

Post by Dr Evil »

Unless you need to keep a navigation in the same place and you want to avoid javascript, I sugest you stay clear of frames.
The nice thing with php is you can build hundreds of similar pages and have the same navigation just as easy to update a a frame if you use an include().
Post Reply