Page 1 of 1

header problems

Posted: Wed Oct 12, 2005 10:06 am
by sebs
Is there another way to redirect a page because I am using session_start() and I can use header after it.I need to close the curent page and open another page automaticly.Can you help me?

Posted: Wed Oct 12, 2005 10:41 am
by pickle
session_start() doesn't need to be called at the absolute beginning of the file, just before any output. I assume you've got a condition to determine if you need to forward the user with header()? In that condition, only call start_session() if you're not forwarding the user.