header problems

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
sebs
Forum Commoner
Posts: 97
Joined: Tue Sep 20, 2005 10:13 am

header problems

Post 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?
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Post 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.
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
Post Reply