How to redirect in the middle of the page

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
detrox
Forum Newbie
Posts: 21
Joined: Wed Jun 04, 2003 1:27 am
Location: P.R.China

How to redirect in the middle of the page

Post by detrox »

header("Location: url"); can be only used when no output occurred.But if i wanna redirect a page when there are something has already been output how can i do that?
[]InTeR[]
Forum Regular
Posts: 416
Joined: Thu Apr 24, 2003 6:51 am
Location: The Netherlands

Post by []InTeR[] »

Output some javascript.

Code: Select all

document.location = 'url';
User avatar
detrox
Forum Newbie
Posts: 21
Joined: Wed Jun 04, 2003 1:27 am
Location: P.R.China

Post by detrox »

Thanks
Post Reply