bilis_money Posted August 21, 2006 Share Posted August 21, 2006 i want to know or is there any other way to redirect a page without using a header().I'm sick using header() it is not very flexible, i'm using header() in the middle of my codes and it always trew me a message error --> [quote]Warning: Cannot modify header information - headers already sent by (output started at...[/quote]yes, i know about the cause of this error it has white spaces and this should be put at the first and no white spaces before the header()... any help from you guys is very appreciated thanks in advance. Quote Link to comment Share on other sites More sharing options...
High_-_Tek Posted August 21, 2006 Share Posted August 21, 2006 Try using output buffering before your call to header() (ob_start(), etc)You can use JS Redirects (non-reliant) and META redirects (same) Quote Link to comment Share on other sites More sharing options...
bilis_money Posted August 21, 2006 Author Share Posted August 21, 2006 hi High-Tek,Do i need to call ob_clean() first before header(),i tested it and it doesn't work, sorry but i'm new to this ob_* thing.please can you show me a snippet codes to do this with the header().thanks in advance.-i'm confuse, i dunno which is the right one to use... Quote Link to comment Share on other sites More sharing options...
tomfmason Posted August 21, 2006 Share Posted August 21, 2006 Do you echo something or have any html output before your header? Quote Link to comment Share on other sites More sharing options...
desithugg Posted August 21, 2006 Share Posted August 21, 2006 yea if you echo something ow have something before the header it will not redirect so if ur using include a page before the header redirevt and that page echos some stuff it will not work Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.