You're right with your method. But if programmer using debuging like in adodb, the debug message cannot display correctly. fn http://www.rindudendam.com On Sat, 2004-03-06 at 16:12, John Shanyinde wrote: > Problems with 'Header Information already sent'? > Solution...Don't use Location: etc, etc > > For example, instead of: > if($username=="admin") > { > header("location: admin/index.php"); > } > elseif($username=="user") > { > header("location: user/index.php"); > } > > You can safely say: > if($username=="admin") > { > echo '<meta http-equiv="refresh" content="0; url= admin/index.php">'; > exit; > } > elseif($username=="user") > { > echo '<meta http-equiv="refresh" content="0; url= user/index.php">'; > exit; > } > > Hope this helps, > > John ------------------------ Yahoo! Groups Sponsor ---------------------~--> Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark Printer at MyInks.com. Free s/h on orders $50 or more to the US & Canada. http://www.c1tracking.com/l.asp?cid=5511 http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/saFolB/TM ---------------------------------------------------------------------~-> Look here for Free PHP Classes of objects: http://phpclasses.UpperDesign.com/ Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/php-objects/ <*> To unsubscribe from this group, send an email to: php-objects-unsubscribe@yahoogroups.com <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/