hey one more addition to what Thomasson said...
you cant output anything prior tp the header function...u'll get a parse error if you do so...
a better solution to do it {if you have to echo) soemthing prior to use of header is to use javascript -> window.location(path)...
this certainly helps..
also as Thomasson said option of including files...that is a better way out..but even here you need to be careful as to not to reoccur variables in the outer file...else the whole code cud go for a toss...
regs,
sgb.